Originally posted by: SystemAdmin
Here's the SQL. Note some limitations/changes:
1. I included all four names (From/To Trading and Application Partner Names); you were probably just interested in "FromPartner".
2. It does not include "Unknown" Trade Links; those have to be "unioned" together with this query. Reports X12 Inbound Only.
3. It made the query much smaller and faster if you manually converted your Transaction Set ID (your '834') into a Functional Group ID ('BE' in this case). I could re-work it to use the transaction set.
Usage:
Change the last two quoted values as needed (GS_VersionRelease and GS_FunctionalID). I added an 'X'
to your version (4010X095A1); remove that if you use custom versions.
If you'd like to modify the query to report all X12 Inbound 'known' links, remove the last two conditions and add them as returned values instead.
SELECT DISTINCT X12TradingPartners.PartnerName AS FromPartner, X12TradingPartners.IchgQual AS ISA05, X12TradingPartners.IchgID AS ISA06, X12AppPartners.ApplicationName AS FromApPartner, X12AppPartners.GS_ApplicationID AS GS02, X12TRADPRTNERS_1.PartnerName AS ToPartner, X12TRADPRTNERS_1.IchgQual AS ISA07, X12TRADPRTNERS_1.IchgID AS ISA08, X12AppPartners_1.ApplicationName AS ToApPartner, X12AppPartners.GS_ApplicationID AS GS03 FROM X12InboundGroups, X12IBTradeLink, X12AppPartners, X12TradingPartners, X12AppPartners X12AppPartners_1, X12TradingPartners X12TRADPRTNERS_1 WHERE X12InboundGroups.X12IBTradeLinkNo = X12IBTradeLink.X12IBTradeLinkNo AND X12IBTradeLink.FromExtAPNo = X12AppPartners.ApplicationNo AND X12AppPartners.PartnerNo = X12TradingPartners.PartnerNo AND X12IBTradeLink.ToIntAPNo = X12AppPartners_1.ApplicationNo AND X12AppPartners_1.PartnerNo = X12TRADPRTNERS_1.PartnerNo AND X12InboundGroups.TradeUnknownInd =
'T' AND X12InboundGroups.GS_VersionRelease =
'4010X095A1' AND X12InboundGroups.GS_FunctionalID =
'BE'
Jim Hobler
IBM Software Engineer
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
SQL is provided 'as-is', and is not a part of the released Trading Manager product. The code has not been subject to regression testing and should be throughly tested before placing into production.
#IBM-Websphere-Transformation-Extender#DataExchange#IBMSterlingTransformationExtender