× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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 ...

Follow-Ups:
Replies:

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

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.