Hi guys,
I'm trying to run a query that gets the folder path of each document in the system. Here is what I have:
select sys_connect_by_path(SUBFOLDER.NAME, '/') PATH
from SUBFOLDER, WTDOCUMENT
where WTDOCUMENT.IDA3B2FOLDERINGINFO=SUBFOLDER.IDA2A2
start with SUBFOLDER.IDA3B2FOLDERINGINFO=0
connect by prior SUBFOLDER.IDA2A2=SUBFOLDER.IDA3B2FOLDERINGINFO
Basically, the where condition checks to see if the document's containing folder is equal to the primary key of the subfolder table. If I do the following query:
select SUBFOLDER.NAME
from SUBFOLDER, WTDOCUMENT
where WTDOCUMENTIDA3B2FOLDERINGINFO=SUBFOLDER.IDA2A2
I get the exact amount of results that I expect. However, when I run the first query, I get the empty set. Any idea why my where condition is failing? If I take out the where condition, I will get all the folder paths, but that's not what I want. I just want the folder path in which my document resides.
Any ideas would be greatly appreciated. Thank you!
Edited by: 810127 on Nov 11, 2010 10:58 AM
Edited by: 810127 on Nov 11, 2010 10:58 AM