i am using select ... as (see attachment above). i believe there is a bug in the upload option under file in the results tab...
Original Message:
Sent: Thu August 10, 2023 01:15 AM
From: Satid Singkorapoom
Subject: issue with uploading results from Run SQL Scripts
I never said that you needed to use LABEL ON ... with SELECT. In fact, I said you run SELECT after LABEL ON .. in one of my posts in this thread.
To address your original question, you have 2 choices :
1) Use SELECT ..... AS (Alias) to rename each column name to what you wanted in your original question. Or
2) Use the column label (Run LABEL ON COLUMN ... before running SELECT) and the choice to display column label (instead of column name) provided in Run SQL Script tool as I described in this thread.
------------------------------
Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
------------------------------
Satid S.
Original Message:
Sent: Wed August 09, 2023 11:17 AM
From: David Strawn
Subject: issue with uploading results from Run SQL Scripts
to my knowledge you can't use label on column with a select statement. i am trying to upload the results of a select statement to the ibm i
------------------------------
David Strawn
Original Message:
Sent: Fri July 28, 2023 08:25 PM
From: Satid Singkorapoom
Subject: issue with uploading results from Run SQL Scripts
Dear David
The DSPFFD screen you provided shows that " is included in the heading text but you can change the heading to whatever text you want (with or without " or underscore) by using SQL statement LABEL ON COLUMN. Samples are provided here : https://www.ibm.com/docs/en/i/7.4?topic=language-creating-descriptive-labels-using-label-statement
>>>> also, after 19 characters in the column name the upload process inserts a blank in the column name.. <<<<
The provided format of a column heading is 3 lines of 20 characters each. This means the first 20 characters (including blank spaces) of the heading text belong to the first line to be displayed, then the next 20 characters each for 2nd and 3rd line. Samples here:
LABEL ON COLUMN CORPDATA.EMPLOYEE.EMPNO IS 'Employee Number'
LABEL ON SAMPLECOLL.INVENTORY_LIST
(ITEM_NUMBER IS 'ITEM NUMBER ',
ITEM_NAME IS 'ITEM NAME ',
UNIT_COST IS 'UNIT COST ',
QUANTITY_ON_HAND IS 'QUANTITY ON HAND ',
LAST_ORDER_DATE IS 'LAST ORDER DATE ',
ORDER_QUANTITY IS 'NUMBER ORDERED ')
------------------------------
Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
------------------------------
Satid S.
Original Message:
Sent: Fri July 28, 2023 10:44 AM
From: David Strawn
Subject: issue with uploading results from Run SQL Scripts
on upload option from ACS Run SQL Scripts, the database file is keeping the double quotes. I don't want the underscore in column names because I am trying to match headings from a 3rd import requirement...
see attachment...
also, after 19 characters in the column name the upload process inserts a blank in the column name...
------------------------------
David Strawn
------------------------------