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



Ted Barry wrote:

>I've never had to deal with this one
>until now...  Is it possible to select
>and/or even update a file with multiple
>record formats?

Maybe.  If you have packed numbers to update it gets harder - you'd probably
have to write your own UDFs.  Anyway, treat the record as a giant character
string and "select" based on a substring.  If your header records all have a
"1" in column 123 then you can select the headers with

select * from flatfile where substr(flatfile, 123, 1) = '1'

You update the same way.  Let's say you need to change that "1" to a "A"

update flatfile set flatfile = substr(flatfile,1,122)
       concat "A" concat substr(flatfile,124,length_of_rest_of_record)
       where substr(flatfile,123,1)='1'

Conceptually, you're building an entire new flat record composed of the
first part of the record concatenated with the changed columns concatenated
with the last part of the record.

I only do this in extreme cases, like being on a system without a compiler.
  --buck


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.