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

Home -> Community -> Usenet -> c.d.o.server -> Re: To convert code from SQL Server.

Re: To convert code from SQL Server.

From: Rüdiger J. Schulz <johannes.schulz_at_web.de>
Date: 28 Nov 2001 17:50:32 +0200
Message-ID: <3c0515e4$2@netnews.web.de>


try to remove the RTRIM-Function

hth
Rüdiger J. Schulz
rjs_at_berlin.de

manish1000_at_hotmail.com (Manish) wrote:
>Dear oracle experts....
>
>This statement works from the SQL Server, however could not be
>compiled as the stored procedure in Oracle, could someone please help
>me with this?
>
>SQL server original statement was:
>
>update TS_TRANSOFFERING_Temp
> set pricedataid=A1.pricedataid
> from TS_TRANSOFFERING_Temp A, TS_TRANSOFFERING_Temp02 A1
> where A1.start_time=A.start_time
> and A1.stop_time=A.stop_time
> and RTRIM(A1.path_name)=RTRIM(A.path_name)
> and RTRIM(A1.service_increment)=RTRIM(A.service_increment)
> and RTRIM(A1.ts_class)=RTRIM(A.ts_class)
> and RTRIM(A1.ts_type)=RTRIM(A.ts_type)
> and RTRIM(A1.ts_period)=RTRIM(A.ts_period)
> and RTRIM(A1.ts_window)=RTRIM(A.ts_window)
> and isnull(RTRIM(A1.ts_subclass),'')=isnull(RTRIM(A.ts_subclass),'')
>
>Oracle translation:
>
>update TS_TRANSOFFERING_TEMP A set pricedataid = nvl((select
>min(A1.pricedataid)
> from TS_TRANSOFFERING_TEMP02 A1
> where A1.start_time = A.start_time
> and A1.stop_time = A.stop_time
> and RTRIM(A1.path_name) = RTRIM(A.path_name)
> and RTRIM(A1.service_increment) = RTRIM(A.service_increment)
> and RTRIM(A1.ts_class) = RTRIM(A.ts_class)
> and RTRIM(A1.ts_type) = RTRIM(A.ts_type)
> and RTRIM(A1.ts_period) = RTRIM(A.ts_period)
> and RTRIM(A1.ts_window) = RTRIM(A.ts_window)
> and NVL(RTRIM(A1.ts_subclass),'NULL') =
>NVL(RTRIM(A.ts_subclass),'NULL')), A.pricedataid)
>
>Thank you,
>
>Manish

-- 
__________________________________________________________
News suchen, lesen, schreiben mit http://newsgroups.web.de
Received on Wed Nov 28 2001 - 09:50:32 CST

Original text of this message

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