Wednesday, March 7, 2012

Hierarchical queries in SQL Server 2000

Hi,
Do we have Hierarchical queries in SQL Server 2000 (like
that by using start with...connect by prior... in
Oracle)?
If someone has worked on some work-around to do so
in SQL Server 2000, pl. let me know.
Thanks in advance.
Regards
M. Subbaiahwe don't have any such things in SQL Server 2000. Though we have it in SQL
Server 2005 which is the Common table Expression.
The work around is to use a table variable and poplute it in a while loop or
use a recursive stored procedure.
--
"Subbaiah" wrote:

> Hi,
> Do we have Hierarchical queries in SQL Server 2000 (like
> that by using start with...connect by prior... in
> Oracle)?
> If someone has worked on some work-around to do so
> in SQL Server 2000, pl. let me know.
>
> Thanks in advance.
> Regards
> M. Subbaiah
>
>|||Take a look at this example:
http://milambda.blogspot.com/2005/0...or-monkeys.html
ML
http://milambda.blogspot.com/|||>> Do we have Hierarchical queries in SQL Server 2000 (like that by using st
art with...connect by prior... in Oracle)? <<
The Oracle construct is a cursor hidden in the proprietary syntax.
Geta copy of TREES & HIERARCHIES IN SQL for several other ways to do
this kidn of thing by haivng proper DDL instead of doing it with
recursive or procedural code.

No comments:

Post a Comment