× 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.



On 28 Nov 2012 16:24, Eric Lehti wrote:
We have been on V7R1 for a week now, having upgraded from V5R4M5.

Issued this SQL command:
ALTER TABLE F55JOBS
ADD COLUMN COUNTRY FOR COLUMN WJCTR
CHAR ( 3)
NOT NULL WITH DEFAULT ' '

In SQL both of these statements return data:

This works: SELECT WJCTR FROM F55jobs

And this works: SELECT country FROM F55jobs

Is this new functionality?

Nothing new. The FOR COLUMN syntax has been supported on both the CREATE TABLE statement and the ALTER TABLE ADD COLUMN statement for as long as I can recall; always, AFaIK. The following snippet of the Syntax Diagram from both statements, is as follows, from as far back as the v4r5 documentation:

column-definition

|---column-name---+-------------------------------------+--->
| .-COLUMN-. |
'-FOR-+--------+--system-column-name--'

There is corresponding support via DDS using the ALIAS (Alternative Name) Keyword for Physical and Logical Files.

Note: I recall only that SQL TRIGGER have a restriction with regard to use of the system-column-name vs the column-name, nothing else I can recall.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.