Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3280

OINV query max(docdate)

$
0
0

Hi Expert!

 

I just want to ask a question about sql queries. I would like to make a query with the latest DocDate like this:

 

SELECT MAX(T0.[DocDate]) , T0.[CardCode] , T0.[DocNum]

FROM  [dbo].[OINV] T0

WHERE T0.[CardCode] ='V1103'

GROUP BY T0.[CardCode], T0.[DocNum]

 

And the result that not so good. The queries generator appear all rows, not just the latest date. Can you help me?

 

Thanks,

Zoli


Viewing all articles
Browse latest Browse all 3280

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>