On Tue, Jul 29, 2008 at 02:03:01PM -0700, Joanne Pham wrote:
> I still have the problem to set the result of the below statement to
> variable so I can print out mulitple times without the executing the
> select statement over and over again.
create a view?
> select '#device local time = ' ||
> (case strftime('%w', d) when '0' then 'SUN' when '1' then 'MON' when '2'
> then 'TUE' when '3' then 'WED' when '4' then 'THUR' when '5' then 'FRI' when
> '6' then 'SAT' end) || ' ' ||
> (case strftime('%m', d) when '01' then 'JAN' when '02' then 'FEB' when '03'
> then 'MAR' when '04' then 'APR' when '05' then 'MAY' when '06' then 'JUN'
> when '07' then 'JUL' when '08' then 'AUG' when '09' then 'SEP' when '10'
> then 'OCT' when '11' then 'NOV' when '12' then 'DEC' end) || ' ' ||
> strftime('%d %H:%M:%S %Y', d,'localtime') || ', '
> from (select CURRENT_TIMESTAMP as d) ;
this seems like a really painful thing to do in sql when the calling
language almost certainly has far easier ways to do this (and you
could make the sql simpler too probably)
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users