LarrySteele
Programmer
I'm trying to borrow a sql statement from:
The specific statement I'm using from the page is:
Each time I try to run this, Oracle returns an invalid qualifier error 'b' on line 'CONNECT BY PRIOR b=a'.
Is there a problem with the way the query is written? It's straight from the web site, but I can't get his query to run. I think what's really eating me is that I'm presuming that the author ran the query posted to retrieve the output posted and I just want to know why I can run what he presumably ran.
As always, help is greatly appreciated,
Larry
The specific statement I'm using from the page is:
Code:
SELECT a,
TO_NUMBER(
SUBSTR(scbp,1,
INSTR(scbp,'.')-1)
) b
FROM (
SELECT a,
LTRIM(
SYS_CONNECT_BY_PATH(a,'.'),
'.') ||'.' scbp
FROM test_table
CONNECT BY PRIOR b=a
)
ORDER BY 2
Each time I try to run this, Oracle returns an invalid qualifier error 'b' on line 'CONNECT BY PRIOR b=a'.
Is there a problem with the way the query is written? It's straight from the web site, but I can't get his query to run. I think what's really eating me is that I'm presuming that the author ran the query posted to retrieve the output posted and I just want to know why I can run what he presumably ran.
As always, help is greatly appreciated,
Larry