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: 8797
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: 19244
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts RC query -Time column CA Products 3
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top