Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sub Queries
Message
De
16/09/2005 03:19:39
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Sub Queries
Divers
Thread ID:
01050154
Message ID:
01050154
Vues:
59
Hi Guys,

I have an SQL table named itemledger which contains 3 columns (itemid,whcode,docdate). The table consist of records having the same itemid and whcode but with different docdate.

Example:

001 MIS      08/01/2005
001 MIS      08/15/2005
001 ACCT   09/08/2005
001 ACCT   09/15/2005

From here, I want to query this table to return the grouped itemid & whcode with the latest dodate.

Expected Result from the query:
001 MIS      08/15/2005
001 ACCT   09/15/2005

Is there a way to formulate a Query Statement that would return these results?

Thanks in Advance...
Music Rocks www.musicreserve.blogspot.com
Success is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform