Home » SQL & PL/SQL » SQL & PL/SQL » Need help with a where clause
Need help with a where clause [message #287517] Wed, 12 December 2007 08:43 Go to next message
dndaughtery
Messages: 1
Registered: December 2007
Junior Member
I need help with a PLSQL where clause. I'm writing a query to pull all records where a field called "IMS_UDT_TS" is a date value in string format and is between todays date and 2months prior. The string data looks like this:

2007-11-18-10.55.37.000000

This is what I have in TSQL but I need it converted to PLSQL:

WHERE (IMS_UDT_TS > convert(varchar(26), DATEADD(mm, - 2, getdate()), 21)) AND (IMS_UDT_TS < convert(varchar(26), getdate(), 21))
Re: Need help with a where clause [message #287519 is a reply to message #287517] Wed, 12 December 2007 08:50 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
TO_DATE
ADD_MONTHS

Regards
Michel
Previous Topic: Passing Refcursors
Next Topic: printing data in a specified format using utl_file
Goto Forum:
  


Current Time: Sun Dec 04 13:05:53 CST 2016

Total time taken to generate the page: 0.05543 seconds