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



I think you can use CAST to make all the fields the same length.

Scott


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Stone, Joel
Sent: Thursday, July 26, 2012 4:11 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: can I set up a multi-format logical file in DDS with
onekeyfield having a default fixed value?

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
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.


________________________________________________________________________
This inbound email has been scanned for all viruses by the MessageLabs
SkyScan
service.
________________________________________________________________________

______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs
Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.