Hello,
I have two tables I'm working on:
In tableA each row consists of an object, its required status and its
current status e.g.
Object Req Status Cur Status
MYOBJECT1 OK NOTOK
MYOBJECT2 *MYSTS PROBLEM
In the above the Req Status column can be a single value (OK) or point to a
list of values (*MYSTS) held in tableB.
If the Req Status column is a list (denoted by the * in the 1st char
position) then I need to refer to tableB for the list of statuses e.g.
tableB
Spec Stat Valid Stat
*MYSTS OK
*MYSTS MAYBE
*MYSTS UNCERTAIN
*JSSTS NOTOK
*JSSTS UNCERTAIN
What I need to do is:
Select all objects from tableA where the Cur Status is < > to the Req Status
That's easy enough. In pseudo programming terms I need to say:
If tableA.Req Status field is a special status (* in first char position)
then compare tableA.Cur Status against the tableB.Valid Status entries
where tableB.Spec Stat = tableA.Req Status
else
just compare the Cur Status to the Req Status column
endif
Can anyone help me on this?
Thanks
Glenn
--
Glenn