On 9/22/2013 6:30 PM, Kristopher Roy wrote:
I am trying to grab the value of custom5 0000% and compare it to skipcount
and then if it is a higher value write it to skipcount, but something is
wrong with my syntax, can anyone help?
INSERT OR REPLACE INTO SONGS (skipcount) Values SELECT substr( custom5, 1,
4) FROM SONGS WHERE custom5 > '0000%' and skipcount < cast( substr(
custom5, 1, 4) as int );
It's not quite clear what you are trying to achieve, but my guess is you
are looking for UPDATE statement:
UPDATE songs SET skipcount = substr( custom5, 1, 4)
WHERE custom5 > '0000%' and skipcount < cast( substr(custom5, 1, 4) as
int );
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users