Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need to understand SQLCODE = 12

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 176
Location: Pune, Maharashtra, India

PostPosted: Thu Nov 05, 2015 11:22 am    Post subject: Need to understand SQLCODE = 12
Reply with quote

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
View user's profile Send private message

rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 176
Location: Pune, Maharashtra, India

PostPosted: Thu Nov 05, 2015 11:26 am    Post subject:
Reply with quote

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
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 176
Location: Pune, Maharashtra, India

PostPosted: Thu Nov 05, 2015 11:57 am    Post subject:
Reply with quote

I got the answer... i have mistyped the column name for which it was giving warning. Sorry, it was bad.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Thu Nov 05, 2015 12:12 pm    Post subject:
Reply with quote

Glad to see you were ale to solve it yourself
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQLCODE-000000080N priya91 DB2 1 Mon Feb 01, 2016 4:35 pm
No new posts Need documents or links to understand... sherlinpraveenkumar IDMS/ADSO 5 Wed Oct 28, 2015 4:40 pm
No new posts SQLCODE -922 in Batch-Cics program tr... kishpra CICS 2 Thu Sep 10, 2015 12:36 pm
No new posts SQLCODE -450 for stored procedure spoorni DB2 3 Fri Jan 16, 2015 2:45 am
No new posts -81 SQLCODE returned when Remote Stor... kameswaramanoj.Akella DB2 1 Wed Dec 03, 2014 5:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us