R Smith, on Wednesday, May 15, 2019 11:06 AM, wrote...
>I of course forgot to remove 'p005' from the list (luckily David
>didn't!), so the query should have been:
>
>UPDATE t AS tx SET b = 'z' WHERE (a,idate) = (SELECT ty.a,MAX(ty.idate)
>FROM t AS ty WHERE ty.a = tx.a GROUP BY ty.a) AND a < 'p005';
>
>which works well here (picking the minimal route), but your actual query
>may or may not work better with the IN ('p001', 'p002',...) method of
>checking.

This is great, though.  Because sometimes I do have to use a BETWEEN 'p002' AND 
'p005'. In this instance, on the real problem, I could not do it because the 
select would not include a sequential list. But, it will be use.  Thanks.

josé
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to