Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Advice needed on Sql Select
Message
De
25/04/2014 15:28:48
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Advice needed on Sql Select
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01599095
Message ID:
01599095
Vues:
114
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é
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform