ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Creating output tree using selects from input tree

Post new topic  Reply to topic
 Creating output tree using selects from input tree « View previous topic :: View next topic » 
Author Message
Gale
PostPosted: Fri Oct 27, 2006 2:50 pm    Post subject: Creating output tree using selects from input tree Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 27, 2006 6:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gale
PostPosted: Mon Oct 30, 2006 1:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Creating output tree using selects from input tree
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.