Freehansje
IS-IT--Management
I have this table
CREATE TABLE table1(
Proc VARCHAR(10),
PrevProc VARCHAR(10))
Both fields are mandatory. In this table sequences are stored of jobs to run. PrevProc will hold the name of the job which has to finish before the job in Proc can run. What I need is a resultset per sequence, which start with a jobname in PrevProc not existing in Proc(this is the first job of this specific sequence) and next all following jobnames in 12 row:
Job1, Job2, Job3, Job4 etc.
I have been fiddling with a SP, where I have played with temptables and such, but what I get is far from complete and very messy. I wonder if this should be possible to create in a view, but sofar I doubt that.
Any hints are welcome
Kind regards,
FreeHansje
CREATE TABLE table1(
Proc VARCHAR(10),
PrevProc VARCHAR(10))
Both fields are mandatory. In this table sequences are stored of jobs to run. PrevProc will hold the name of the job which has to finish before the job in Proc can run. What I need is a resultset per sequence, which start with a jobname in PrevProc not existing in Proc(this is the first job of this specific sequence) and next all following jobnames in 12 row:
Job1, Job2, Job3, Job4 etc.
I have been fiddling with a SP, where I have played with temptables and such, but what I get is far from complete and very messy. I wonder if this should be possible to create in a view, but sofar I doubt that.
Any hints are welcome
Kind regards,
FreeHansje