PeteAmsterdam
Programmer
I need to read a "flat" file with (hundreds) of sql.
The file is very simple:
A status field
A record type field
A key field
A data field
I'd like to define a view for each type of DS so I can use them freely via Sql without having to
hardcode positional substring in the statements.
Basically I know how to do it:
CREATE VIEW MUTABCAB0F (TACDCABINA, TADSCABINA, TADATARILA)
AS SELECT
SUBSTR(TBCDELEME, 1, 5) ,
SUBSTR(TBDATITAB, 1, 50) ,
DATE(SUBSTR(TBDATITAB, 51, 10))
FROM MUTABEL00F
WHERE TBSETTORE = 'CAB'
The view is working but it's really poor since the fields generated are not referenced to the
original DS.
How can I copy the characteristics of one element to another of the CREATE TABLE on CREATE VIEW?
Thanks in advance
Pete
The file is very simple:
A status field
A record type field
A key field
A data field
I'd like to define a view for each type of DS so I can use them freely via Sql without having to
hardcode positional substring in the statements.
Basically I know how to do it:
CREATE VIEW MUTABCAB0F (TACDCABINA, TADSCABINA, TADATARILA)
AS SELECT
SUBSTR(TBCDELEME, 1, 5) ,
SUBSTR(TBDATITAB, 1, 50) ,
DATE(SUBSTR(TBDATITAB, 51, 10))
FROM MUTABEL00F
WHERE TBSETTORE = 'CAB'
The view is working but it's really poor since the fields generated are not referenced to the
original DS.
How can I copy the characteristics of one element to another of the CREATE TABLE on CREATE VIEW?
Thanks in advance
Pete