× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



It will be very interesting to know how will the system cascade the name change to RPG,CL, REXX,COBOL programs, and how will it do it when the same file (table) exists is several librarys.

If the database was an isolated product the name-change is not so hard, specialy if you leave it up to the user to fix the programs that are afected by the change. In i we are used to backwards compatibility.

Vernon Hamberg wrote:

You seem to assume that MSSQL is a good model - I wouldn't make that assumption. It has several things that MIGHT seem to make life easier if we had them in DB2 on IBM i, but they are an extension found only in that product. We have similar things on IBM i, like the rrn() function, say.

Now if other DB2's have it, I'm more inclined to say, ask for it. Do a DCR or go to www.common.org and add a requirement there - You don't need to be a COMMON member, just get a user and passwordin the "Community" tab.

On 5/21/2013 11:07 AM, Matt Olson wrote:

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.