On 22-Oct-2015 11:29 -0500, Vernon Hamberg wrote:

I probably speak from ignorance, but I don't think non-i RDBMS typically
have an equivalent of column headings

Probably they do have that attribute; and the data coming from a LABEL ON COLUMN ... IS statement syntax available from their SQL.

But probably even more likely, they would have REMARKS [aka LONG_COMMENT], if only to provide something for the ODBC 1.0 capabilities of the sqlColumns function; i.e. data coming from a COMMENT ON COLUMN ... IS statement syntax.

And IIRC, the sqlColumns() API results from IBM i drivers originally [and likely still do] effect for the REMARKS, the expression of COALESCE(remarks, labeltext, "LABEL") against SYSCOLUMNS catalog data. Therefore the TEXT() and COLHDG() *may* have value to requests made from elsewhere, if\when there was no COMMENT ON COLUMN done for that particular COLUMN_NAME.

Since ODBC 1.0 was added the SQL_DESC_LABEL to the sqlColAttribute function. AIUI, that data correlates directly to the effect of the LABEL ON COLUMN ... IS statement's string-constant data; i.e. the "LABEL" [aka COLUMN_HEADING] from SYSCOLUMNS. That is why my opening "Probably they do have".

- I do believe I've seen descriptions of columns in SQL Server,
though, which would be like the TEXT attribute.

I am similarly ignorant, as a result of fading memory, but what I recall is that other databases have and use Column Heading where the DB2 for i would use\expect TEXT; that other databases have LABEL ON COLUMN ... IS statement syntax in their SQL, but nothing equivalent to the LABEL ON COLUMN ... TEXT IS statement syntax in their SQL.


I also believe that column headings can be used in non-i reporting and
query tools, but again I speak from relative ignorance and not having
tried for awhile.


Most likely, the SQL_DESC_LABEL data; i.e. most client-based accesses are going to reflect ODBC specifications.?


This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 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].