Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Flat file creation problems

Re: Flat file creation problems

From: Kenneth C Stahl <BlueSax_at_Unforgetable.com>
Date: Fri, 21 Jan 2000 07:46:43 -0500
Message-ID: <38885533.D0D32967@Unforgetable.com>


Steve McDaniels wrote:
>
> I would NOT use a separator because one cannot guarantee that the separator
> is not part of the data.
>
> Try something like RTRIM on the offending field(s)
>
> select rtrim(column1) a, ...
>

How do you know that spaces won't be part of the value? You can't just flatly say that no one should use delimiters since they may be part of the daya.

Flat files have been used since the earliest days. There are two basic types of flat files:

  1. SDF (Standard Delimited Files). In the olden days these were often called card image files because the physical record length was 80 characters - the number of characters that could be entered on a punch card. If the logical record spanned more than one physical record, then some type of continuation character was used to logically join the two records. Every field in the record was assigned a specific length and therefore you could always know that a field would span specific columns. Strings were left justified. Numbers were right justified.
  2. Delimited files. The data fields in these files are separated by a pre-determined delimiter. Because certain windows applications have a strong preference for data delimited by commans there is even a sub-catetory that many people are now familiary with - CSV (Comma Seperated Values). The practice of using a delimited file is widely accepted and as long as the delimiter does not appear in the data then it will cause no problem in usage. The individuals who work with the data for any individual application are the best positioned to determine what printable characters would not appear in the data.

For someone to just blanketly say "I would NOT use a separator because one cannot guarantee that the separator is not part of the data." demonstrates that they are just mere amateurs in the data processing world. Received on Fri Jan 21 2000 - 06:46:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US