On Thu, Nov 12, 2015 at 6:44 PM, J Decker <d3ck0r at gmail.com> wrote:

> So... I guess something like this works; other than the triplication
> of the initial path string. works for read-only access... doesn't
> return where it failed (although can with leaf == 0 )
>

You can use multiple WITHs to get rid of some of that duplication, moving
the duplicated values into "upper" WITHs.

something like (untested):

with jackpot(v) as (
  select './DEFAULT/jackpot_sign/sack/PSI/Frame border/Height'
), -- don't remember if comma is needed between WITHs


> with option (option_id,path,rpath, leaf) as (    \
>     select option_id   \
>         ,j.v  as path    \
>         , substr( j.v    \
>                 , instr( j.v, '/' ) + 1 ) as rpath \
>         , 0 as leaf \
>              from option4_map     \
>
, jackpot j

>              join option4_name on
> option4_map.name_id=option4_name.name_id   \
>
...

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

Reply via email to