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 -> Re: migrating a query from t-sql to plsql

Re: migrating a query from t-sql to plsql

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Mon, 06 Dec 2004 08:05:49 -0800
Message-ID: <1102349050.550730@yasure>


sodedra_at_incodewireless.com wrote:

> 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
What is the problem? And what version of Oracle?
-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Mon Dec 06 2004 - 10:05:49 CST

Original text of this message

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