Re: converting from Oracle to SQL Server

From: tojo <Tojo_at_hotmail.com>
Date: Fri, 22 Nov 2002 12:16:37 +0100
Message-ID: <MPG.18483082471322339896d6_at_news.t-online.de>


In article <2075941.1037955556_at_dbforums.com>, member_at_dbforums.com says...
>
> I have this Oracle Sql statement but I need to convert it to SQL Server
> Statement.
> "SELECT LPAD('-', 2*(LEVEL-1),'-') || DESCRIPTION DESCRIPTION,
> LEVEL_CODE
> FROM T_NBS_LEVELS"SQLStr=SQLStr&"
> START WITH PARENT_CODE = 0"SQLStr=SQLStr&"
> CONNECT BY PRIOR LEVEL_CODE=PARENT_CODE "
>
> Sql Server gives Run time error message which is about LPAD is not
> recognized etc...
>
> Also does anybody know a tool that converts Oracle Sql statements to SQL
> Server Statement?

You're gonna have bigger problems with CONNECT BY, I think. For LPAD you can use LEN and REPLICATE in SQL-Server. The folks at microsoft.public.sqlserver.* might know more.

  • Tom
Received on Fri Nov 22 2002 - 12:16:37 CET

Original text of this message