On 5/11/2011 8:52 PM, John wrote:
> here is the view:
>
> create view today_goal as
> select 'monday' dow, monday_goal value from user_goals
> union all
> select 'tuesday' dow, tuesday_goal value from user_goals
> union all
> select 'wednesday' dow, wednesday_goal value from user_goals
> union all
> select 'thursday' dow, thursday_goal value from user_goals
> union all
> select 'friday' dow, friday_goal value from user_goals
> union all
> select 'saturday' dow, saturday_goal value from user_goals
> union all
> select 'sunday' dow, sunday_goal value from user_goals;
>
> select dow, value from today_goal;

I kind of wonder why you can't just set up your original table this way 
to begin with, and not bother with the view.
-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to