|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
SELECT [] on [] does not work |
« View previous topic :: View next topic » |
Author |
Message
|
Patman28981 |
Posted: Thu Sep 01, 2011 4:35 am Post subject: SELECT [] on [] does not work |
|
|
Newbie
Joined: 01 Sep 2011 Posts: 3
|
Hi everybody,
I try to copy in ESQL on one node all fields to another set of fields, like this:
(SELECT berechtigt.KKDVOLL AS type:v
FROM msg.KKDVOLLMX[] AS berechtigt
WHERE berechtigt.KKDVOLL <> '' AND berechtigt.KKDVOLL <> '0000000') AS data:Verfuegungsberechtigter.data:Kundennummer[]
Please note that data:Verfuegungsberechtigter.data:Kundennummer[]
is an array and msg.KKDVOLLMX[] is an array too. Nevertheless the systm only copies one item (the first one of berechtigt.KKDVOLL ) I do not understand this because berechtigt looks like this:
berechtigt
KKDVOLL 12345
KKDVOLL 78901
KKDVOLL 1234
and so on.
On the WSDL file the Kundennummer is an array with maximum of -1 (infinite) the code is a subselect and part of a bigger select like this:
SET oM.service:GetKontoByKontonummerResult[] = SELECT
(SELECT msg.KAZEKDN AS type:v FROM msg) AS data:AbweichenderKontoauszugempfaenger.data:Kundennummer,
msg.* please do not use * AS data:Betreff,
(SELECT convert_toDec(msg.KSDSALDO) AS type:Betrag,
CAST(msg.KPZWAESL AS CHARACTER FORMAT '0000000') AS type:Waehrung.type:Key
FROM msg
WHERE msg.KSDSALDO <> '0' AND msg.KSDSALDO <> '') AS data:Hoehe,
--msg.KEVKUNDE AS data:Kontoinhaber.type:v,
TRIM(LEADING '0' FROM msg.KEVKUNDE) AS data:Kontoinhaber.type:v,
msg.KIDKTOID.KIDKTONR AS data:Kontonummer.type:v,
(SELECT berechtigt.KKDVOLL AS type:v
FROM msg.KKDVOLLMX[] AS berechtigt
WHERE berechtigt.KKDVOLL <> '' AND berechtigt.KKDVOLL <> '0000000') AS data:Verfuegungsberechtigter.data:Kundennummer[],
...
FROM iM.KAUS[] AS msg;
The result gives always the first item of berechtigt.KKDVOLL.
Can you please help?
Cheers,
Patrick |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 01, 2011 5:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Why not use CREATE...FROM? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Patman28981 |
Posted: Thu Sep 01, 2011 6:09 am Post subject: |
|
|
Newbie
Joined: 01 Sep 2011 Posts: 3
|
Good idea, can you make an example for me? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 01, 2011 7:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Patman28981 wrote: |
Good idea, can you make an example for me? |
There's one in the description of the verb. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Patman28981 |
Posted: Thu Sep 01, 2011 7:22 am Post subject: |
|
|
Newbie
Joined: 01 Sep 2011 Posts: 3
|
O.K. thanks. I will try this. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 01, 2011 7:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Patman28981 wrote: |
O.K. thanks. I will try this. |
If you get problems post again with the actual ESQL you're using, the input XML & result (or put a Trace node before and after) and a user trace (with code tags to aid legability please). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
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
|
|
|
|