|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Table Join |
« View previous topic :: View next topic » |
Author |
Message
|
bobbee |
Posted: Wed Jul 20, 2016 9:16 am Post subject: Table Join |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
I originally did a search on SELECT ESQL Database Joins. After reading this is what I wrote. One of the conditions broke and I showed it to the customer to see if this condition can happen. His first remark is "I don't see you doing any JOINs'. I look at this and understand it, well I wrote it. The other queries work where I am doing the same. I there a better way?
Code: |
SET OutputRoot.XMLNSC.ns:sourceTransactions.ns1:sourceTransaction.ns1:SourceTransaction[ODMCallIndex].ns1:TSCode =
THE (Select one.VALUE
FROM Database.CFFACT.T_Account_Property AS one,
Database.CFFACT.Account_Property_Type AS two,
Database.CFFACT.T_Account AS three,
Database.CFFACT.T_TXN_ACCOUNT_REFERENCE AS four
WHERE four.TRANSACTION_ID = TRANID and 23494901
three.ACCOUNT_ID = four.ACCOUNT_ID and 23204958
three.ACCOUNT_ID = one.ACCOUNT_ID and
one.ACCOUNT_PROPERTY_TYPE_ID = two.ACCOUNT_PROPERTY_TYPE_ID and
two.NAME = 'SOURCE_APPL_CODE'); |
|
|
Back to top |
|
 |
bobbee |
Posted: Wed Jul 20, 2016 9:18 am Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
excuse the numbers after the 'and' these were the values used in that line. I was debugging by hand. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jul 20, 2016 10:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I hear you. Looks like a join.
http://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ak05830_.htm
Try and switch it around a little:
Code: |
SET OutputRoot.XMLNSC.ns:sourceTransactions.ns1:sourceTransaction.ns1:SourceTransaction[ODMCallIndex].ns1:TSCode =
THE (Select one.VALUE
FROM Database.CFFACT.T_Account_Property AS one,
Database.CFFACT.Account_Property_Type AS two,
Database.CFFACT.T_Account AS three,
Database.CFFACT.T_TXN_ACCOUNT_REFERENCE AS four
WHERE four.TRANSACTION_ID = TRANID and 23494901
three.ACCOUNT_ID = four.ACCOUNT_ID and 23204958
two.NAME = 'SOURCE_APPL_CODE' and
one.ACCOUNT_ID = three.ACCOUNT_ID and
one.ACCOUNT_PROPERTY_TYPE_ID = two.ACCOUNT_PROPERTY_TYPE_ID ); |
Hope it helps some  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bobbee |
Posted: Wed Jul 20, 2016 10:26 am Post subject: |
|
|
 Knight
Joined: 20 Sep 2001 Posts: 545 Location: Tampa
|
That is the link i was looking at. thanks for the adjustment. |
|
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
|
|
|
|