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

DROP A COLUMN FROM THE TABLE( what restricts that )


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ursprasanna
Warnings : 2

New User


Joined: 15 May 2006
Posts: 20
Location: chennai

PostPosted: Wed May 17, 2006 12:17 pm
Reply with quote

DB2 dosent allow deleting a column from the table . why is it so. I would like to what actually restricts from doing that .
Back to top
View user's profile Send private message
hariavinash

New User


Joined: 04 Jan 2006
Posts: 64

PostPosted: Thu May 18, 2006 6:19 pm
Reply with quote

you can DROP a table only.
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Mon Jul 03, 2006 12:28 pm
Reply with quote

1.U have to create table first with dropped column defenition.
2.Unload data using PARMS as SQL usnig DSTIUAL utility excluding the
row that u dont want
SELECT EMAPNAME,SALRY...
FROM TABLE
WHERE ...


3.INSERT that data to the new table using this unloaded data by using the same Utiltity.

4.DROP original Table.

I assume u dont have any Constraits set up in the parent table.
-------
2.Mapfail occurs when user not enters any data and without that press Function keys. For this to avoid easiset way is to always set the MDT set irrespective of whether user enters some data or not.

Otherwise u have to check Mapfail condition after receieving the map ...failing to do so would terminate the task with an abnormal end.

-Han
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top