On 25/02/2009 1:13 PM, BenJones12345 wrote: > Hi all > > I'm very much a beginner with sqlite3 and and I'm completely stumped with > using the replace function. > > What I have is a field (TheOldField) with values like: > > HM1 > HP4 > HM3 > HM2 > > and I need to replace all "P" with "+" and all "M" with "-", and put the > result into a new field (TheNewField). All the documentation everywhere > suggests I should use the replace function. So what I'm trying to do is > (just for the P's at first): > > UPDATE TheTable > set TheNewField = replace(TheOldField, "P", "+"); > > but doing this I get the error message > > "SQL error: no such function: replace" > > Which I dont understand. Can anybody tell me what I'm doing wrong or offer > an alternative solution?
Check your SQLite3 version. Latest release in 3.6.11. Latest I have is 3.6.10 which includes replace() However an old 3.3.6 command-line executable reproduces your problem. HTH, John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users