Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Convert code from SQL Server 2000 to SQL Plus for Oracle
You are running into a few issues here:
The code you show is primarily procedural and looks like a TransactSQL dialect. Therefore you will need to manually transform it to PL/SQL if you want to remain procedural.
In this case, however, the specific operation (transforming date presentations and apparently showing the first/last days of month) can be done in relatively simple SQL selects in Oracle using the TO_DATE and TO_CHAR functions.
In my experience, many SQL Server code artists do not understand SQL or set theory and therefore have written between 50% and 2000% more code than necessary. This example seems to fit as well.
I strongly advise the following:
In the last, look at the SQL Language Reference manual and the PL/SQL language manuals.
Hope this helps
/Hans
Received on Tue Apr 08 2003 - 11:33:16 CDT
![]() |
![]() |