Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 17, 2012 02:06 AM by Lannie
Member
375 Points
1033 Posts
Nov 16, 2012 12:43 PM|LINK
how can i get the max date but i don't want to use max function to group data
and join other table , but i don't know why i always dulipate data after joining table.
SELECT * FROM DD D LEFT OUTER JOIN
(SELECT * FROM DATETABLE WHERE NAME='B' AND ID='1' AND ROWNUM=1 ORDER BY SAVE_DATE DESC ) T ON D.ID=T.ID
I DON'T KNOW WHY I CAN'T RETRIEVE THE MAX SAVE_DATE WHEN ID=1
Contributor
3738 Points
728 Posts
Nov 17, 2012 02:06 AM|LINK
show table col names for DD and DATETABLE
show desired output col names for your query
When NAME = 'B' and ID = '1' is more than one date possible??
do not know the nature of your data
then we can help you better
-_-
Member
375 Points
1033 Posts
max date record
Nov 16, 2012 12:43 PM|LINK
how can i get the max date but i don't want to use max function to group data
and join other table , but i don't know why i always dulipate data after joining table.
SELECT * FROM DD D LEFT OUTER JOIN
(SELECT * FROM DATETABLE WHERE NAME='B' AND ID='1' AND ROWNUM=1 ORDER BY SAVE_DATE DESC ) T ON D.ID=T.ID
I DON'T KNOW WHY I CAN'T RETRIEVE THE MAX SAVE_DATE WHEN ID=1
Lannie
Contributor
3738 Points
728 Posts
Re: max date record
Nov 17, 2012 02:06 AM|LINK
show table col names for DD and DATETABLE
show desired output col names for your query
When NAME = 'B' and ID = '1' is more than one date possible??
do not know the nature of your data
then we can help you better