Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL syntax on Grouping together different type
Message
From
10/09/2006 12:31:21
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL syntax on Grouping together different type
Miscellaneous
Thread ID:
01152655
Message ID:
01152655
Views:
72
Dear All,

I want to generate a table from a source table like
staff_id
record_time
record_type: i.e. 1=Day In;2=Lunch start; 3=Lunch End;4=Day Out
Therefore, basically, if the staff comes for whole day, he/she could have 4 records in the source table e.g.
staff_id   Record_time   Record_type
--------------------------------------
1   2006-09-01 09:00:00   1
1   2006-09-01 13:00:00   2
1   2006-09-01 14:30:00   3 
1   2006-09-01 18:00:00   4 
To generate a view for "timecard", I want to have a cursor table like this:
staff_id   record_date  day_in   lunch start    Lunch end   Day_out
----------------------------------------------------------------------
1     2006-09-01     09:00:00   13:00:00     14:30:00    18:00:00
PLEASE HELP
Best regards,

Aaron Chu

********************************************************

Working with Visual FoxPro is a lot of FUN!

********************************************************
Next
Reply
Map
View

Click here to load this message in the networking platform