Home » Other » Client Tools » Lookup Parent Value and Generate a String
Lookup Parent Value and Generate a String [message #38705] Tue, 07 May 2002 09:32 Go to next message
Rob
Messages: 70
Registered: January 2000
Member
I have a table where data is organized into multiple levels. I have the need to pass into a procedure the lowest level and lookup the parent level to the top of the hierarchy. The data looks like this...

PK LEVEL NAME PARENT
45 100 USA
46 200 WA 45
47 200 CA 45
48 300 Sea 46
49 300 LA 47

I need to be able to output something like this:
Sea/WA/USA

Is there a way to do this using multiple cursors or a loop?

Any help is greatly appreciated...
Re: Lookup Parent Value and Generate a String [message #38706 is a reply to message #38705] Tue, 07 May 2002 09:53 Go to previous message
KK
Messages: 24
Registered: March 2002
Junior Member
U shud use recursive function...but I am not sure of syntax
Previous Topic: Re: Help on Dynamic SQL using Execute Immediate
Next Topic: user from dual doesn't evaluate against table column
Goto Forum:
  


Current Time: Thu Mar 28 08:46:43 CDT 2024