View previous topic :: View next topic
|
Author |
Message |
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
I have written below SQL to find out accounts from TAB A which are present in TAB B and TAB C. I am getting my expected result but getting warning in SPUFI with SQLCODE = 12. So, just wondering whats the exact meaning of it and why i am getting this error.
Code: |
SELECT PRFX,ACCT,SFX
FROM TAB A,TAB B
WHERE A.PRFX = B.PRFX
AND A.ACCT = B.ACCT
AND A.SFX = B.SFX
AND A.TYP = '08'
AND (PRFX||
DIGITS(ACCT)||
SFX) IN (
SELECT DISTINCT(PRFX||
DIGITS(ACCT)||SFX)
FROM TAB C); |
Error message which i have received :
Code: |
SQLCODE = 12, WARNING: THE UNQUALIFIED COLUMN NAME SFX WAS
INTERPRETED AS A CORRELATED REFERENCE
SQLSTATE = 01545 SQLSTATE RETURN CODE
SQLERRP = DSNXORSO SQL PROCEDURE DETECTING ERROR
SQLERRD = 0 0 2 1177631809 0 0 SQL DIAGNOSTIC INFORMATION
SQLERRD = X'00000000' X'00000000' X'00000002' X'46313C41'
X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION |
|
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
I know there are mulitple ways to write above SQL but just curious to know about SQLCODE = 12 and why i am getting this WARNING... |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
I got the answer... i have mistyped the column name for which it was giving warning. Sorry, it was bad. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Glad to see you were ale to solve it yourself |
|
Back to top |
|
|
|