Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 to_date (Oracle) --> SQL Server

Author  Topic 

delphi007
Starting Member

2 Posts

Posted - 2004-05-17 : 06:22:48
Hi I have trouble getting the following Oracle Code to run by SQL Server. The to_date function is not known bei SQL Server.
I tried to write it with cast and convert but still won't get it running.
I would appreciate any help...


[...]

' getting DateAfter...
strDateAfter = request("DayAfter") & "-" & request("MonthAfter") & "-" & request("YearAfter")
strDateBefore = request("DayBefore") & "-" & request("MonthBefore") & "-" & request("YearBefore")

if len(strDateAfter) = 8 and len(strDateBefore) = 8 then

whrDate = " to_date(lease_end_date, 'dd-mm-yy') BETWEEN to_date('" & strDateAfter & "', 'dd-mm-yy') AND to_date('" & strDateBefore & "', 'dd-mm-yy') AND"

[...]

nr
SQLTeam MVY

12543 Posts

Posted - 2004-05-17 : 07:25:35
Duplicate post
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=35174

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -