Simpel query, need help
Hej eksperter.. har den her SQL query, er det noget jeg ikke lige kan finde ud af...Skal have den til at sige, Hvis der er flere No_ med samme id/navn, skal den kun vise den med den nyeste Starting Date.
Hmm, det er vel egentligt ganske simpelt, men er ikke den vilde SQL haj... håber i kan hjælpe mig.
SELECT [dbo_3 NY BASIC$Item].No_, [dbo_3 NY BASIC$Item].Description, [dbo_3 NY BASIC$Item Translation].[Language Code], [dbo_3 NY BASIC$Item Translation].Description, [dbo_3 NY BASIC$Sales Price].[Sales Code], [dbo_3 NY BASIC$Sales Price].[Starting Date], [dbo_3 NY BASIC$Sales Price].[Unit Price]
FROM [dbo_3 NY BASIC$Sales Price] INNER JOIN ([dbo_3 NY BASIC$Item Translation] INNER JOIN [dbo_3 NY BASIC$Item] ON [dbo_3 NY BASIC$Item Translation].Item_Master=[dbo_3 NY BASIC$Item].No_) ON [dbo_3 NY BASIC$Sales Price].[Item No_]=[dbo_3 NY BASIC$Item].No_
WHERE ((([dbo_3 NY BASIC$Item].No_)="dbu11,060,147") AND (([dbo_3 NY BASIC$Item Translation].[Language Code])="NORSK") AND (([dbo_3 NY BASIC$Sales Price].[Sales Code])="10045"))
ORDER BY [dbo_3 NY BASIC$Item].No_, [dbo_3 NY BASIC$Sales Price].[Starting Date];