Author |
Message
|
kwelch |
Posted: Fri Jan 18, 2002 10:33 am Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 255
|
Hi,
Has anyone used used the select statement to set an output variable before? If so do you have any samples? We have been coding based on the samples and don't get any errors but it does not work correctly either.
We are using this syntax:
SET OutputRoot.MRM.AgencyKey[] = THE (SELECT InputBody.Agency FROM InputBody.Location[] WHERE InputBody.Agency = '001');
We are using MQSI v2.0.1.
All suggestions welcome. Thanks.
Karen |
|
Back to top |
|
 |
kirani |
Posted: Fri Jan 18, 2002 10:40 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Karen,
What is your input message type (MRM, XML or NEON) here? Could you please post your input message?
Kiran
|
|
Back to top |
|
 |
kwelch |
Posted: Fri Jan 18, 2002 10:56 am Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 255
|
The input message is xml. I will try and get a sample of it and the actual ESQL being used. thanks |
|
Back to top |
|
 |
kwelch |
Posted: Fri Jan 18, 2002 11:04 am Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 255
|
Kiran,
Ok, here is the esql and the xml.
SET "OutputRoot"."MRM".PrmsBldgId[1].PrmsKeyId =
THE (SELECT "InputBody".CommlPropertyScheduleSubmitRq.Location.ItemIdInfo.AgencyId FROM
"InputBody".CommlPropertyScheduleSubmitRq.Location[] WHERE
"InputBody".CommlPropertyScheduleSubmitRq.Location.ItemIdInfo.AgencyId = 001);
-
-
-
001
-
-
002
I am posting this on behalf of a co-worker. Thanks for any help.
Karen |
|
Back to top |
|
 |
kwelch |
Posted: Fri Jan 18, 2002 11:04 am Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 255
|
Sorry! I forgot to disable HTML! Here is the xml again!
- <CommlPropertyScheduleSubmitRq>
- <Location>
- <ItemIdInfo>
<AgencyId>001</AgencyId>
</ItemIdInfo>
</Location>
- <Location>
- <ItemIdInfo>
<AgencyId>002</AgencyId>
</ItemIdInfo>
</Location>
</CommlPropertyScheduleSubmitRq> |
|
Back to top |
|
 |
kirani |
Posted: Fri Jan 18, 2002 11:52 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Karen,
Your are missing 'ITEM' keyword and '' in your ESQL. Try using
SET "OutputRoot"."MRM".PrmsBldgId[1].PrmsKeyId =
THE (SELECT ITEM "InputBody".CommlPropertyScheduleSubmitRq.Location.ItemIdInfo.AgencyId FROM
"InputBody".CommlPropertyScheduleSubmitRq.Location[] WHERE
"InputBody".CommlPropertyScheduleSubmitRq.Location.ItemIdInfo.AgencyId = '001');
|
|
Back to top |
|
 |
kwelch |
Posted: Fri Jan 18, 2002 12:17 pm Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 255
|
Kiran,
Thank you so much!! That did the trick!!!!
Karen |
|
Back to top |
|
 |
|