Converting CONNECT_BY_ROOT function in Oracle to Teradata

Database

Converting CONNECT_BY_ROOT function in Oracle to Teradata

Hi All,

As per the requirement, I am converting oracle sql to teradata. Oracle sql contains both SYS_CONNECT_BY_PATH and CONNECT_BY_ROOT functions in the select statement. I was able to successfully coonvert the SYS_CONNECT_BY_PATH function to Teradata by writing WITH RECURSIVE query. But, I am stuck up in the conversion of CONNECT_BY_ROOT fucntion. Please help.

Regards,
Ajay
1 REPLY
Senior Apprentice

Re: Converting CONNECT_BY_ROOT function in Oracle to Teradata

Hi Ajay,

CONNECT_BY_ROOT is usually the same as a column from the seed query.

There's an old article on IBM's DeveloperWork showing how to port from CONNECT BY to WITH RECURSIVE, most can be applied to Teradata, too:

http://www.ibm.com/developerworks/data/library/techarticle/dm-0510rielau/

Dieter