|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Creating output tree using selects from input tree |
« View previous topic :: View next topic » |
Author |
Message
|
Gale |
Posted: Fri Oct 27, 2006 2:50 pm Post subject: Creating output tree using selects from input tree |
|
|
Novice
Joined: 08 Dec 2004 Posts: 12 Location: Portland, OR
|
This should be simple, but I haven't found a way to do it. I am selecting from my input tree into my output tree. I then need to select from a different section of my input tree into the same structure of the output tree. When I do the 2nd select, it over writes the data from the first. Is there a way to APPEND the data and create additional Part occurrences with the 2nd select? (This is a simplified version. I have 9 different sections I need to append and many more fields.)
First select:
SET OutputRoot.MRM.Parts.Part[] = (
SELECT 'X' AS PartInfo.ProviderCode,
DSI.dsInd:V_MATNR AS PartInfo.Code,
DSI.dsInd:V_VKORG AS DirectShip.SalesOrg
FROM DSIinref.dsInd:prgn_gt_dsind[] AS DSI);
Second:
SET OutputRoot.MRM.Parts.Part[] = (
SELECT 'X' AS PartInfo.ProviderCode,
DG.dsGrp:V_MATNR AS PartInfo.Code,
DG.dsGrp:V_VKORG AS DirectShip.SalesOrg
FROM DSGinref.dsGrp:prgn_gt_ds_disgrp[] AS DG);
Thanks for any help you can give. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 27, 2006 6:13 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Code: |
SET Environment.Variables.DSI.Part[] = (
SELECT 'X' AS PartInfo.ProviderCode,
DSI.dsInd:V_MATNR AS PartInfo.Code,
DSI.dsInd:V_VKORG AS DirectShip.SalesOrg
FROM DSIinref.dsInd:prgn_gt_dsind[] AS DSI);
SET Environment.Variables.DG.Part[] = (
SELECT 'X' AS PartInfo.ProviderCode,
DG.dsGrp:V_MATNR AS PartInfo.Code,
DG.dsGrp:V_VKORG AS DirectShip.SalesOrg
FROM DSGinref.dsGrp:prgn_gt_ds_disgrp[] AS DG);
Set OutputRoot.MRM.Parts.Part[] = (SELECT A.*, B.* from Environment.Variables.DSI as A, Environment.Variables.DG as B); |
UNTESTED.
Also, someone smarter than me could probably do it in one Select. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Gale |
Posted: Mon Oct 30, 2006 1:47 pm Post subject: |
|
|
Novice
Joined: 08 Dec 2004 Posts: 12 Location: Portland, OR
|
Thanks!! This makes perfect sense. I'll give it a try.
Gale |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|