Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts reg query on DYNALLOC feature raghuraman123 SYNCSORT 12 Wed Jan 10, 2018 2:42 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us