IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What will happen when a column not present in Select Query


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 1208
Location: Bangalore,India

PostPosted: Tue Nov 28, 2006 12:18 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top