Hi,
I'm formatting fields when creating my view and would like to reuse
the existing labels.
e.g.
Create View TEST AS SELECT
AMOUNT,
CURRENCY,
DIGITS(CUSTNO) AS PADCUSTNO,
DATE(DAYNO) AS FDAYNO
FROM
DB2TRANSACTIONS
When the view is queried, only the AMOUNT and CCY fields contains the
description and column heading specified in the DB2 table.
Is there any way of extracing the description from the formatted
fields?
I.e. When I generate the SQL from the view created above, it reveals
the following:
CREATE VIEW TEST (
AMOUNT,
CCY,
PADCUSTNO,
FDAYNO)
AS SELECT AMOUNT, CURRENCY, DIGITS(CUSTNO) AS PADCUSTNO,
DATE(DAYNO) AS FDAYNO FROM DB2TRANSACTIONS;
LABEL ON TABLE TEST IS 'Test formatted view';
LABEL ON COLUMN TEST
(AMOUNT IS 'Amount',
CCY IS 'Currency');
LABEL ON COLUMN TEST
(AMOUNT TEXT IS 'Amount',
CCY TEXT IS 'Currency');
Does anyone know how I may assign labels to the customer number
(PADCUSTNO) and date fields (FDAYNO) taken from the original fields
(CUSTNO and DAYNO)?
I have many fields and this could potentially save me weeks of work if
I don't have to hard code the description into the view but let it
pick it up from the table!
Thanks in advance,
Dave