I think a DCR request is the way to go. There is no way it needs to be nearly this complicated. They can look at how MS SQL Server does it as a good model to base it off of. Or just execute the alter column syntax that was previously referenced which exists in LUW version of DB2 but seems to be missing from IBM i's DB2 flavor (these two development teams really need to grab a cup of coffee and talk to each other once in a while).

See here: http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.dbobj.doc%2Fdoc%2Ft0020130.html


-----Original Message-----
From: CRPence [mailto:CRPbottle@xxxxxxxxx]
Sent: Tuesday, May 21, 2013 10:50 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Change column name on DDL SQL table in iSeries Navigator

On 21 May 2013 07:07, Matt Olson wrote:
Anyone figure out how to rename a column in iSeries navigator on a SQL
DDL table?

Someone recently started an off-topic thread on the RPG400-l subject "change column name in sql?"; I gave some replies, one including some effective scripts [without the "CL:" designation for the non-SQL]:
http://archive.midrange.com/rpg400-l/201305/threads.html#00120

For the life of me I can't figure out why it doesn't allow column
renames.

Renaming a column is allowed and easily effected with the CREATE VIEW statement; optionally combined with RENAME TABLE or RENAME VIEW so as to have the VIEW object with the corrected names take place of the TABLE or VIEW which still has the undesirable names.

Hardly trivial, in general, to change the actual column name in a TABLE because of issues with dependencies. Yet for a trivial scenario where there are no dependencies and the record format could be updated and its new definition refreshed in the catalogs, it is similarly easy for the user to accomplish the same effect with DROP TABLE and CREATE TABLE [when no data or with data then including also a RENAME and INSERT INTO ... SELECT], or a couple or a few ALTER TABLE requests; as shown in my replies in the thread for the included link.

--
Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.