For a table named bb:
I have a sqlite database named bb:
> Name Price1 Price2 Slevel
> A1 23 231 NULL
> A2 22 12 NULL
> A3 21 223 NULL
UPDATE bb SET Slevel =
CASE price1>12 WHEN 1 THEN 1 ELSE 0 END +
CASE price1>30 WHEN 1 THEN 1 ELSE 0 END +
CASE price2>20 WHEN 1 THEN 1 ELSE 0 END +
CASE price2>30 WHEN 1 THEN 1 ELSE 0 END +
CASE price2>80 WHEN 1 THEN 1 ELSE 0 END;
I want to judge bb.name if has char ('A') then end+,
how to write this ?
CASE Name like 'A?' WHEN 1 THEN 1 ELSE 0 END +
It's right?
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users