Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Advice needed on Sql Select
Message
From
25/04/2014 15:28:48
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Advice needed on Sql Select
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01599095
Message ID:
01599095
Views:
113
Here's my situation. I'd like to get info from different tables so I'll be using a join.

as an example let's say I have an employee table. In that table there is the id of the employee, when the employee starts his day defined as an integer and when the employee finished his day defined once again as an integer.

Now let's say we have a table containing a bunch of times.

structure of the time table could be an integer for the primary key and a string for the time possible and this would be 5 characters.


Table employee

EmployeeId AutoInt
BeginTime Integer
EndTime Integer


Table TimeDef
IdTime Integer
DescTime C5

a select for this could be :

select EmployeeId, DescTime ;
from Employee ;
left join TimeDef on employee.BeginTime = TimeDef.IdTime

This previous select should work ok. But how do I get the description (DescTime) for my EndTime in the same select?
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Next
Reply
Map
View

Click here to load this message in the networking platform