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
 

 

What will happen when a column not present in Select Query

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

New User


Joined: 07 Nov 2006
Posts: 16
Location: banglore

PostPosted: Tue Nov 28, 2006 12:12 pm    Post subject: What will happen when a column not present in Select Query
Reply with quote

SLECT C1,C2,C3,C4 FROM EMPLOYEE > But wht will happen when when C4 is not present in the EMPLOYEE table



thanks
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Nov 28, 2006 12:18 pm    Post subject:
Reply with quote

Hi Arun,

It will give u following message.

Code:
SQLCODE = -206, ERROR:  C4 IS NOT A COLUMN OF AN INSERTED 
TABLE, UPDATED TABLE, OR ANY TABLE IDENTIFIED IN A FROM CLAUSE, OR IS
NOT A COLUMN OF THE TRIGGERING TABLE OF A TRIGGER                     
Back to top
View user's profile Send private message
Sreedhar.P

New User


Joined: 08 Dec 2006
Posts: 2
Location: bangalore

PostPosted: Tue Dec 12, 2006 3:53 pm    Post subject: Hi There
Reply with quote

When u run the query in QMF u will get the following message.

QUERY MESSAGES:
Column IHSIMID is not in any table named in the query.

Thanks
Sreedhar
Back to top
View user's profile Send private message
ravi17s
Warnings : 1

New User


Joined: 15 Aug 2003
Posts: 57

PostPosted: Tue Dec 12, 2006 5:41 pm    Post subject: Re: What will happen when a column not present in Select Que
Reply with quote

Adding Batch execution .......

Compilation Error: Host variable not found (if you include the DCLGEN generated by DB2 in the program)

IF not at BIND time -206, ERROR: C4 IS NOT A COLUMN OF AN INSERTED ....as stated by Arun

Thx,
Ravi
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 Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm


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