Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with SQL (View)
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Help with SQL (View)
Miscellaneous
Thread ID:
00273317
Message ID:
00273317
Views:
46
I have a table with the following fields:

GROUP (C) 20
EMPLOYEE (C) 20
BEGINTIME (C) 8
ENDTIME (C) 8
TOTALTIME (I) 4
STATUS (C) 3

I'm attempting to create a view for a report that would look something like the following:

------------------------------------------------------------------
EMPL TOTAL INSIDE OUTSIDE OTHER
GROUP EMPL CNT MIN CNT MIN CNT MIN CNT MIN
------------------------------------------------------------------
A EMP1 4 100 2 50 1 25 1 25
EMP2 2 100 0 00 2 100 0 00
--------------------------------------------------
GROUP A TOTAL: 6 200 2 50 3 125 1 25

I've got the view so I get a view of the Group, empl, empl cnt and total minutes. But for the Inside,Outside,Other comes from the status field. I'm thinking I need to build an expression using the IIF() function, but I don't know where to start with that. Right now my view is group on Group and Empl and sort by the same.

Any and all idea's welcome.
Kirk Kelly
kkelly@cqisol.com
Next
Reply
Map
View

Click here to load this message in the networking platform