Associated Multi-Valued Fields from Thin Air

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Associated Multi-Valued Fields from Thin Air

Post by ray.wurlod »

Hope the subject doesn't scare anyone away.

Here's a useful query in RetrieVe, using generated field names and on-the-fly of field names temporarily declared to be multi-valued. I'll post the SQL equivalent tomorrow.

Code: Select all

LIST VOC 'DSR_LAST_UPDATED' ID.SUP F3 AS JOB_NAME MULTI.VALUE FMT "32L" F4 AS LAST_RAN MULTI.VALUE FMT "24R" ASSOC.WITH JOB_NAME HEADING "Last run times of jobs in this project 'G'Page 'SGLL'"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Very cool Ray.
Mamu Kim
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

SQL figures out the relationship somehow within the query engine, so one does not need to declare the columns to be temporarily multi-valued.

Code: Select all

SELECT F3 AS JOB_NAME FMT '36L',
       F4 AS LAST_RAN FMT '23R'
FROM   VOC
WHERE  F0 = 'DSR_LAST_UPDATED';
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply