Column heading is actually a LABEL in SQL terminology. So after you create
a table, you'd do something like:

LABEL ON COLUMN SCHOOL IS 'Elementary School District

Notice that you can have up to 3 rows of column heading as each row will
hold up to 20 characters worth of data.

You can also add up to 50 characters descriptive text to the column by
another LABEL command, for example:

LABEL ON COLUMN SCHOOL IS 'Elementary school district 535 rocks the house'

I wouldn't use QMQRYs for this type of DDL work since it doesn't permit for
running multiple statements within the same source (well, I guess you can
use QM procedures but...).
RUNSQLSTM on the other hand allows for multiple statements in the same
source, separating them with semicolons.



2007 System i Fall Technical Conference | Orlando | November 4-7
Celebrating 10-Years of SQL Performance Excellence on IBM i5/OS and OS/400

-----Original Message-----
Subject: Using SELECT AS to Create Column Heading

Can someone tell me is it is possible to use SELECT AS in a QMQRY to
generate multi-word column headings without getting the double quotes as
part of the heading?

Here's the SQL stmt:
select a.stschl as SCHOOL,
a.stgrd as GRADE,
a.sthmrm as HOMEROOM,
c.empin as "TEACHER ID",

When run DSPFFD the double quotes are part of the column heading?

Thank you, Bob

This thread ...


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

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