But doesn't this require all field attributes to be identical? I don't have that - fields have varying lengths.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Mildenberger
Sent: Thursday, July 26, 2012 4:13 PM
To: Midrange Systems Technical Discussion
Subject: RE: can I set up a multi-format logical file in DDS with one keyfield having a default fixed value?
This makes me think of what I did just yesterday, the SQL experts here
will know if this could be incorporated into a CREATE INDEX or CREATE
VIEW, if so I think this would create exactly what the OP was looking
for because the table created had a new field 'type' that had hard-coded
values depending on which part of the union they came from.
I did this, the UNION ALL was from the same file but didn't have to be
and I hard-coded a value from each select to distinguish them:
select cnunit, expiredate, type from table(
SELECT cnunit, cnwcmpdate as expiredate, 'Work Comp' as type
FROM trucklib.contract
UNION ALL
SELECT cnunit, add_months(cntsadate, 24) as expiredate, 'TSA' as
type FROM trucklib.contract)
as z where (days(expiredate) - days(curdate()) < 90) order by
expiredate
Scott
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: Thursday, July 26, 2012 3:00 PM
To: Midrange Systems Technical Discussion
Subject: Re: can I set up a multi-format logical file in DDS with one
keyfield having a default fixed value?
He doesn't want a join, he wants a UNION ALL...
Vertical, not horizontal :)
Charles
As an Amazon Associate we earn from qualifying purchases.
This thread ...
Re: can I set up a multi-format logical file in DDS with one key field having a default fixed value?, (continued)
This mailing list archive is Copyright 1997-2024 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].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.