IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

MAX DATE query


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cooldude

New User


Joined: 08 May 2008
Posts: 5
Location: pune

PostPosted: Fri Mar 11, 2011 3:55 pm
Reply with quote

Hi,
Can anybody have idea for the below scenario.

I have to fetch the records from table having the latest date.
suppose for the cust_id E000101020 i have 20 rows and out of which i want the cust id having the latest date

i have tried a lot but not coming exactly what i expected.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8798
Location: Welsh Wales

PostPosted: Fri Mar 11, 2011 5:05 pm
Reply with quote

Then please tell us what you have already tried so that we do not waste time suggesting the same thing.

Have you googled MAX
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Mar 11, 2011 8:47 pm
Reply with quote

Hello,

Quote:
suppose for the cust_id E000101020 i have 20 rows and out of which i want the cust id having the latest date
Would not the cust_id be E000101020 icon_confused.gif

Quote:
Have you googled MAX
Or searched this DB2 part of the forum (forum SEARCH above in the blue bar).
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts DB2 Query to get the count of Unique ... DB2 2
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts Sort card to know that creation date ... DFSORT/ICETOOL 10
No new posts Help with SORT - I need to validate d... DFSORT/ICETOOL 11
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 1
Search our Forums:


Back to Top