Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MIN - DateTime issue
Message
De
25/04/2005 15:11:06
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
MIN - DateTime issue
Divers
Thread ID:
01008193
Message ID:
01008193
Vues:
56
Hi,

TABLEA
-------
CustomerID -unique identifier
Name - varchar
DateRegistered - datetime
#ofDaysOff - int
#FreeDaysOff - int

My problem is that I need to get to get the employeeid of most senior employee with a criteria of 2 days off.

I have tried this query but I dont get the correct date

DECLARE @customerid as varchar(100)
SELECT @customerid = customerid, MIN(DateRegistered) FROM
TABLEA WHERE #ofDaysOff = 2
GROUP BY customerid


Thanks for your help.

A
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform