Recursive View

Database
N/A

Recursive View

Hi All,

I have a question about recursive views.

Currently I have defined a view that is recursive. This works perfect (view 1).

Now I want to join this view in a query, and make this query a new view (view 2).

However, when I do the CREATE VIEW for view 2, I get an Teradata error: 6926

Can someone help me how to solve this error? Thanks

For the record views / queries.

The recursive view that I want to use in a new view:

S_USER_IF_TEST2.dtree

Query that I want to make into a view. (Without view it works)

SELECT * FROM D_INTERNAL_ORGANIZATION.V_MRKT

WHERE CD_CL IN (

SELECT DISTINCT /*D.*, */ CVS.ATHRZD_ENTTY_VL

FROM

                S_USER_IF_TEST2.dtree AS  D,

                S_USER_IF_TEST2.V_CRTR_VL_ST AS CVS

WHERE

                D.AuthorizedValueSet = CVS.ATHRZD_DT_ST

AND

                D.ValueSetName = CVS.DT_ST_TYP_NM

AND

                CVS.ACTV = 'Y'

) ;

The recursive view that I want make, based on above view.

REPLACE VIEW S_SA_ACL.V_MRKT  AS LOCKING ROW FOR ACCESS

SELECT * FROM D_INTERNAL_ORGANIZATION.V_MRKT

WHERE CD_CL IN (

SELECT DISTINCT /*D.*, */ CVS.ATHRZD_ENTTY_VL

FROM

                S_USER_IF_TEST2.dtree AS  D,

                S_USER_IF_TEST2.V_CRTR_VL_ST AS CVS

WHERE

                D.AuthorizedValueSet = CVS.ATHRZD_DT_ST

AND

                D.ValueSetName = CVS.DT_ST_TYP_NM

AND

                CVS.ACTV = 'Y'

) ;

Thanks in advance.

--Srini