MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how can we deleted un-used column's in a database table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
babun
Beginner


Joined: 03 Aug 2005
Posts: 19
Topics: 9
Location: bangalore

PostPosted: Thu Aug 04, 2005 1:43 am    Post subject: how can we deleted un-used column's in a database table Reply with quote

how can we deleted un-used column's in a database table ?
can you people give me more solutions reg this ...

move is one technique ,,,do we have any other option to do ?
_________________
babu
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Thu Aug 04, 2005 3:58 am    Post subject: Reply with quote

I am sorry, but I do not understand either of the posts.
Quote:
how can we deleted un-used column's in a database table ?

What is the meaning of 'unused' here?
Quote:
move is one technique

What is the meaning of 'move' here?
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
batu544
Beginner


Joined: 02 Aug 2005
Posts: 75
Topics: 27

PostPosted: Thu Aug 04, 2005 8:04 am    Post subject: Reply with quote

Hi,
As far as my knowledge , U can't delete a column from a table in DB2.

but in othe database lke ORACLE u can do it by using ALTER command.

I think one way to do is create a table having all the required column and load that table.
_________________
Regards,
batu
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
karthikeyan
Beginner


Joined: 29 May 2004
Posts: 16
Topics: 4
Location: chennai

PostPosted: Thu Aug 04, 2005 12:11 pm    Post subject: You cant Drop Reply with quote

Hi
You can drop a column in the Oracle 9i but not in the earlier versions
But in DB2 we dont have that provision.So u have use that move what u said earlier
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Thu Aug 04, 2005 12:16 pm    Post subject: Reply with quote

Quote:

But in DB2 we dont have that provision. So u have use that move what u said earlier


karthikeyan,

What exactly is a "move" ? If you want to drop a column from a table in DB2 z/os you need to drop and re-create(minus unused columns) the entire table.

Let me know what you mean by "move"

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
babun
Beginner


Joined: 03 Aug 2005
Posts: 19
Topics: 9
Location: bangalore

PostPosted: Fri Aug 05, 2005 2:25 am    Post subject: Reply with quote

according to come sources,, the move means ,,,we can move the columns except un-used columns into some other table through move...n delete that table which having with un-used columns..
un-used column's ,,client said i am not going to use some of the columns in future n ask to delete those 2 columns,,,that is it..
u r opinion's are invited..
_________________
babu
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
batu544
Beginner


Joined: 02 Aug 2005
Posts: 75
Topics: 27

PostPosted: Fri Aug 05, 2005 5:22 am    Post subject: Reply with quote

1. one way is create a new table except that unused column and load that table.

2. U can create a view by taking only used columns .


Very Happy
_________________
Regards,
batu
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Fri Aug 05, 2005 5:59 am    Post subject: Reply with quote

Quote:

according to come sources,, the move means ,,,we can move the columns except un-used columns into some other table through move...n delete that table which having with un-used columns..


babun,

There is no such thing called "MOVE" in DB2. As mentioned earlier you need to drop and re-create the table without the unwanted columns

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu


Last edited by kolusu on Fri Aug 05, 2005 8:47 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
batu544
Beginner


Joined: 02 Aug 2005
Posts: 75
Topics: 27

PostPosted: Fri Aug 05, 2005 8:10 am    Post subject: Reply with quote

kolusu,

i didn't say anything like this....

Embarassed
_________________
Regards,
batu
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Fri Aug 05, 2005 8:43 am    Post subject: Reply with quote

A simple case of mistaken identity!

Don't take it too hard. Mr. Green



Cheers,
Merv
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Fri Aug 05, 2005 8:50 am    Post subject: Reply with quote

batu544,

My sincere apologies. sorry !

I edited the post to reflect the right person.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
schintala
Beginner


Joined: 18 May 2005
Posts: 108
Topics: 31
Location: USA

PostPosted: Fri Aug 05, 2005 9:52 am    Post subject: Reply with quote

db2move is a data movement tool that can be used to move large numbers of tables between DB2 databases. This command works in DB2 for LUW applications. I don't think there is anything called DB2 MOVE in z/OS environment.
Back to top
View user's profile Send private message
batu544
Beginner


Joined: 02 Aug 2005
Posts: 75
Topics: 27

PostPosted: Fri Aug 05, 2005 10:50 am    Post subject: Reply with quote

ha..ha... u ppl also don't take it too hard.... Very Happy
_________________
Regards,
batu
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Fri Aug 05, 2005 1:09 pm    Post subject: Reply with quote

schintala,

Can the db2move utility on UDB export and import selected columns? I thought that it could only move whole tables.

Of course, for DB2 on S/390, the only option is to drop and recreate the table.

Regards,
Manas
_________________
There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948)
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
schintala
Beginner


Joined: 18 May 2005
Posts: 108
Topics: 31
Location: USA

PostPosted: Fri Aug 05, 2005 3:05 pm    Post subject: Reply with quote

Yes, you are right. DB2MOVE utility only to move the whole table. It can't used to move part of the table columns.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group