Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> migrating a query from t-sql to plsql
hi guys,
i am having difficuly in getting my head around this any help
would be great.
I have a ms sql server which i am porting over to oracle. what i need help on is to translater the query below into plsql.
the dateadd and the datepart functions are driving me crazy.
CASE WHEN B.END_TIME < DateAdd(mi,Case When DatePart(hh,B.START_TIME)
>= 12 THEN -1 ELSE 0 END,dateadd
(hh,-datepart(hh,dateadd(hh,12,B.START_TIME)),dateadd(hh,12,dateadd(mi,-datepart(mi,B.START_TIME),B.START_TIME))))
THEN DateAdd(mi,Case When DatePart(hh,B.START_TIME) >= 12 THEN -1 ELSE
0 END,dateadd
(hh,-datepart(hh,dateadd(hh,12,B.START_TIME)),dateadd(hh,12,dateadd(mi,-datepart(mi,B.START_TIME),B.START_TIME))))
ELSE B.END_TIME END END_TIME,
DateAdd(mi,Case When DatePart(hh,B.START_TIME) >= 12 THEN -1 ELSE 0
END,dateadd
(hh,-datepart(hh,dateadd(hh,12,B.START_TIME)),dateadd(hh,12,dateadd(mi,-datepart(mi,B.START_TIME),B.START_TIME))))
START_TIME
Received on Mon Dec 06 2004 - 09:22:17 CST