Wednesday, March 7, 2012

Is it any functions similar to "START WITH" and "CONNECT BY" in MS SQL?

Hi all,
I am looking for some functions which are used as "Start with" and "Connect
By" in Oracle. Please help! Thx a lot.
Regards,
ThomasHello, Thomas
If you are interested in recursive queries for processing a tree-like
data structure, you should take a look at CTE-s (Common Table
Expressions) and Recursive CTE-s in Books Online and other MSDN
articles:
http://msdn2.microsoft.com/en-us/library/ms175972.aspx
http://msdn.microsoft.com/msdnmag/issues/04/02/TSQLinYukon/#S7
Razvan|||Hi,
There is no equivalent of start with and connect by of oracle in sql
server,
got thorugh this links,
credit - vyaskn
http://vyaskn.tripod.com/oracle_sql_server_differences_equivalents.htm
Handling hierarchical data in Sql Server =>
http://vyaskn.tripod.com/hierarchies_in_sql_server_databases.htm
Thanks,
Sree
Razvan Socol wrote:
> Hello, Thomas
> If you are interested in recursive queries for processing a tree-like
> data structure, you should take a look at CTE-s (Common Table
> Expressions) and Recursive CTE-s in Books Online and other MSDN
> articles:
> http://msdn2.microsoft.com/en-us/library/ms175972.aspx
> http://msdn.microsoft.com/msdnmag/issues/04/02/TSQLinYukon/#S7
> Razvan|||> There is no equivalent of start with and connect by of oracle in sql
> server,
> got thorugh this links,
This information has not been updated for SQL 2005. Did you not follow the
links Razvan posted? It is certainly possible to accomplish this using
CTEs.
--
Hope this helps.
Dan Guzman
SQL Server MVP
<gsreejith@.gmail.com> wrote in message
news:1138965840.226876.87400@.g49g2000cwa.googlegroups.com...
> Hi,
> There is no equivalent of start with and connect by of oracle in sql
> server,
> got thorugh this links,
> credit - vyaskn
> http://vyaskn.tripod.com/oracle_sql_server_differences_equivalents.htm
> Handling hierarchical data in Sql Server =>
> http://vyaskn.tripod.com/hierarchies_in_sql_server_databases.htm
> Thanks,
> Sree
>
> Razvan Socol wrote:
>> Hello, Thomas
>> If you are interested in recursive queries for processing a tree-like
>> data structure, you should take a look at CTE-s (Common Table
>> Expressions) and Recursive CTE-s in Books Online and other MSDN
>> articles:
>> http://msdn2.microsoft.com/en-us/library/ms175972.aspx
>> http://msdn.microsoft.com/msdnmag/issues/04/02/TSQLinYukon/#S7
>> Razvan
>|||So, Should explicitly say for Sql Server 2000... :)
I have not tried CTE yet
Anyway thanks for correcting.
Thanks,
Sree

No comments:

Post a Comment