Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

query to retrieve column value and use in other rows of the table

user7955917Jul 3 2014 — edited Jul 9 2014

Hi all  ,

I have a table where I maintain  name value pairs of a particular   job  .  Now I would like see  some of  value  of this rows passed to other rows in a table for example

create job_name_value

(

  job_name   varchar2(100),

  name  varchar2(100),

  value  varchar2(100)

);

job_namenamevalue
TRGJOB%FPATH/USR/LOCAL/TRGJOB
TRGJOB%FDATECALDATE+1
TRGJOB%FNAME1%FPATH.mywatchfile1.%FDATE
TRGJOB%FNAME2%FPATH.mywathcfile2.%FDATE
TRGJOB%FNAME3%FPATH.mywatchfile3.%FDATE

can we write a sql query to produce a output like  below  the objective is use the value of fdate and fpath in the remaining rows . if there is no fdate and fpath  then the value should return as it is  or we need to use stored proc to achieve this

/usr/local/trgjob/mywatchfile1.CALDATE+1

/usr/local/trgjob/mywatchfile2.CALDATE+1

/usr/local/trgjob/mywatchfile3.CALDATE+1

This post has been answered by Frank Kulash on Jul 3 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2014
Added on Jul 3 2014
6 comments
649 views