When I Copy a Join SQL query code from the Query Tab of the Query Builder and then Paste it to a new Editor window, the query statement gets modified or changed, and then it will give an error when I run it. Also right when I performed the Copy on the query code, a pop-up bubble came up showing:
"SQL modified to match connection syntax"
Example:
Original SQL code Copied:
SELECT Lookup.Lookup
FROM
`Local Storage Connection`.PKS.Lookup Lookup
LEFT OUTER JOIN
`MXOUA2 (mxorpts)`.MXOAPP.TICKET TICKET
ON (Lookup.Lookup = TICKET.TICKETID)
When I Paste the code in an Editor window (or Notepad), the query code got modified or changed to:
SELECT TICKET.TICKETID
, TICKET.STATUS
FROM
PKS."Lookup" Lookup
LEFT OUTER JOIN
MXOAPP.TICKET TICKET
ON ("Lookup"."Lookup" = TICKET.TICKETID)
When I run the modified code, I get the error below.
Lookup Error
ERROR [42704] [IBM][DB2/AIX64] SQL0204N "PKS. Lookup" is an undefined name.
Paste your code in a Cross-Connection SQL Editor (Alt + C) as regular Editor will encounter an error since you have a cross-connection or heterogeneous query.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center