473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

V9 Column Rename

I am running V9 FP2 on DPF. I understand that V9 LUW now lets you
rename a column. I can't seem to get the sytax right. Can anyone
point me to what is wrong?

db2 "ALTER TABLE myschema.mytable RENAME COLUMN current_colname to
new_colname"

I'm getting :

DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0104N An unexpected token "rename" was found following
"ALTER TABLE myschema.mytable". Expected tokens may include:
"ALTER".
SQLSTATE=42601

Jul 26 '07 #1
2 10201
mike_dba wrote:
I am running V9 FP2 on DPF. I understand that V9 LUW now lets you
rename a column. I can't seem to get the sytax right. Can anyone
point me to what is wrong?
DB2 9 for LUW does not directly support RENAME column.
You can rename a column indirectly by adding a new column with the
appropriate name and dropping the original after copying the data.

Support for RENAME column is known requirement.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 26 '07 #2
On Jul 26, 12:22 pm, Serge Rielau <srie...@ca.ibm.comwrote:
mike_dba wrote:
I am running V9 FP2 on DPF. I understand that V9 LUW now lets you
rename a column. I can't seem to get the sytax right. Can anyone
point me to what is wrong?

DB2 9 for LUW does not directly support RENAME column.
You can rename a column indirectly by adding a new column with the
appropriate name and dropping the original after copying the data.

Support for RENAME column is known requirement.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Thanks for the prompt reply. I mistakenly looked at the V9 z/OS
manual where it looks like it may be permitted.

Thanks again for your reponse.
Jul 26 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: TroelsM | last post by:
Hi there ! I am trying to rename a column i Access Set Conn1 = Server.CreateObject("ADODB.Connection") Conn1.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &...
1
by: Marble | last post by:
Hi all: In DB2 CLP mode ,how to change a column name expect to recreate a table? Thanks . Your friends.
5
by: Robert Stearns | last post by:
Either I missed something, or ALTER TABLE does not have this capability. Is there any way of doing it except DROPping all constraints which mention this table, EXPORTing the data, DROPping the...
11
by: Steven Smith | last post by:
When this event is triggered the following exception error occurs: 'System.Data.SyntaxErrorException' Missing operand after 'of' operator. So presumably it doesn't like the spaces in the column...
0
by: juliane26 | last post by:
Even so it should not be there, it sometimes is: somebody wants to rename a column. Today we do unload / recreate table / load using our own db utilities to do so. Now we evaluate Object...
31
by: Sarita | last post by:
Hello, this might sound stupid, but I got a really nice homepage template which unfortunately is a 3-Column Fixed Width CSS format. Now I don't have any content for the right column and would...
4
by: ganeshshegde | last post by:
How to rename the column? i entered "alter table student_19104 rename student_marks to stud_marks" But it's giving error "missing PARTITION or SUBPARTITION keyword "
1
by: Gladiator | last post by:
Hi Team , Can some one tell me why we dont we have a DROP column or rename a column command in DB2 ? I Have a very Huge table and need to rename a column . The only option i have to do to rename...
4
by: ShadowLocke | last post by:
Hi, I have a table that has a column with name "comment" in it. I think that "comment" is an oracle keyword so i would like to rename this column. when i use the syntax "alter table tablename...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.