On 4/12/18, Csányi Pál <csanyi...@gmail.com> wrote:
> 2018-04-12 17:08 GMT+02:00 Keith Medcalf <kmedc...@dessus.com>:
>>
>> select TheDate from Dates where TheDate == date('now');
>
> Yes, but I want the CASE because if there is no such date in the Dates
> table which is equal to the date('now') then it should return the
> date('now','+1 day').

... COALESCE((SELECT thedate FROM dates WHERE thedate==date('now')),
date('now','+1 day'))

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to