Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to convert SQL Server hierarchical query (CTE) to Oracle?

47 views
Skip to first unread message

Stavelot

unread,
Jun 22, 2009, 3:41:11 AM6/22/09
to
How to convert SQL Server hierarchical query (CTE) to Oracle?

WITH cte (col1, col2) AS
(
SELECT col1, col2
FROM dbo.[tb1]
WHERE col1 = 12
UNION ALL
SELECT c.col1, c.col2
FROM dbo.[tb1] AS c INNER JOIN cte AS p ON c.col2 = p.col1
)
DELETE a
FROM dbo.[tb1] AS a INNER JOIN cte AS b
ON a.col1 = b.col1

0 new messages