Re: converting from Oracle to SQL Server

From: Brian E Dick <bdick_at_cox.net>
Date: Fri, 22 Nov 2002 13:53:26 GMT
Message-ID: <qFqD9.3957$wc2.236908_at_news2.east.cox.net>


Search the SQL Server Books OnLine (BOL) for "Expanding Hierarchies".

-Bad news
SQL Server doesn't support recursive SQL. You will have to write a stored procedure or user defined function.

-Good news
You can use a user defined function in the FROM clause.

"cuneyt" <member_at_dbforums.com> wrote in message news:2075939.1037955501_at_dbforums.com...
>
> 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?
>
> --
> Posted via http://dbforums.com
Received on Fri Nov 22 2002 - 14:53:26 CET

Original text of this message