Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> migrating a query from t-sql to plsql

migrating a query from t-sql to plsql

From: <sodedra_at_incodewireless.com>
Date: 6 Dec 2004 07:22:17 -0800
Message-ID: <1102346537.055567.256510@c13g2000cwb.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US