|
-
SQL Query
Hello All
I have one problem in SQL Query.
I want to compare two dates having timestamps.
e.g.
Select SYSDATE From Dual
Where TO_CHAR(SYSDATE, 'MM/DD/YY hh24:mi:ss') > TO_CHAR('4/18/02 04:04:55',
'MM/DD/YY hh24:mi:ss')
I have Oracle8.
It gives error.
Can anyone help me in this matter.
Thanx,
Sandeep
-
Re: SQL Query
Why not use TO_DATE(). Ex.
Select SYSDATE From Dual
Where SYSDATE > TO_DATE('4/18/02 04:04:55','MM/DD/YY hh24:mi:ss')
HTH.
--
Larry Miller
MCSD, Microsoft MVP Visual FoxPro
Bifrost Solutions
"Sandeep" <Sandeep_S_Kulkarni@ril.com> wrote in message
news:3cbfb651$1@10.1.10.29...
>
> Hello All
>
> I have one problem in SQL Query.
> I want to compare two dates having timestamps.
>
> e.g.
> Select SYSDATE From Dual
> Where TO_CHAR(SYSDATE, 'MM/DD/YY hh24:mi:ss') > TO_CHAR('4/18/02
04:04:55',
> 'MM/DD/YY hh24:mi:ss')
>
> I have Oracle8.
> It gives error.
>
> Can anyone help me in this matter.
>
> Thanx,
> Sandeep
>
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks