Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

get the max date from table

$
0
0

hi

i have below data in my table.

instance   entrydate   program              code

1              02/22/2013            50            df

2             03/03/2014            4              gf

3             12/13/2014             50            rd

what i need is i need to pick the latest instance of program 50 and i need to use that code to join another table.

how to do that, can i use max date , then i need to do group by and then its getting max date by every program.

i dotn want that, i just need latest record of program 50 , just 1 row and its associated code

please help me 


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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