Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 26th, 2007, 05:05 PM
mike_dba
Guest
 
Posts: n/a
Default 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

  #2  
Old July 26th, 2007, 05:25 PM
Serge Rielau
Guest
 
Posts: n/a
Default Re: V9 Column Rename

mike_dba wrote:
Quote:
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
  #3  
Old July 26th, 2007, 07:05 PM
mike_dba
Guest
 
Posts: n/a
Default Re: V9 Column Rename

On Jul 26, 12:22 pm, Serge Rielau <srie...@ca.ibm.comwrote:
Quote:
mike_dba wrote:
Quote:
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.


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles