I have an SQLite database attached to a Xojo project. I need to strip off the first character, IF it is a quote mark. Here is what I tried:
t=Chr(34)+"%" // this holds the Quote mark and the wild card
S="db.SQLExecute UPDATE "+ CurrentTableName + " SET " + Feilder +" = SUBSTRING("+Feilder+", 2, LEN("+Feilder+")) "
S=S+"WHERE "+Feilder+" LIKE "+t
db.SQLExecute S
I am getting a syntax error even without the WHERE clause. CurrentTableName
holds the table name, Feilder
holds the field (or column) being evaluated.
In SQLite, here is what I am trying to do:
UPDATE Table SET Myfield = SUBSTRING(Myfield, 2, LEN(MyField))
WHERE MyFiled LIKE "%
Thanks, Eric.