-
max date
What's wrong with this query .
I am looking for the latest date
select max(to_char(created_date,'dd/mm/yy hh24:mi:ss') from pay_info;
This gives some old data and i know i have latest data
when i query like this it gives me an error
select to_char(max(created_date,'dd/mm/yy hh24:mi:ss') from pay_info;
any idea folks?
thnaks
Ramana
-
Re: max date
Originally posted by RamanaSQL
What's wrong with this query .
I am looking for the latest date
select max(to_char(created_date,'dd/mm/yy hh24:mi:ss') from pay_info;
This gives some old data and i know i have latest data
of course, you're getting the max() of a string
when i query like this it gives me an error
select to_char(max(created_date,'dd/mm/yy hh24:mi:ss') from pay_info;
What's the error? What is the data type of created_date?
Jeff Hunter
-
check this out...
select to_char(max(created_date),'dd/mm/yy hh24:mi:ss') from pay_info;
Srini
-
It worked ..thanks Srinivas_Sharma
and thank you marist89
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|