Re: dbload delimiter for SE
Posted in 1995
Hotchkiss and Wiley (hotch@netcom.com) wrote:
: From what I have read (documentation-wise), if I want
: to create a dbload command file in delimiter form for
: Informix SE, I am restricted to a single character,
: e.g. FILE input.file DELIMITER " " 6; INSERT INTO...
: will consider single blanks in the file "input.file"
: as delimiters, but if I have more than one consecutive
: blank, each pair of blanks defines a NULL column which
: is NOT what I want!
: So this would work as an input line in "input.file":
: inputDat1 inputDat2 inputDat3...
: but this would not:
: inputDat1 inputDat2 inputDat3...
: Why is SE's DELIMITER parameter so inflexible compared to
: C file i/o which easily handles multiple blank delimiters?
I think this is typical with any RDBMS's file-loading tools (incl Sybase's
Bulkcopy), not just dbload. If you had wanted to have those spaces represent
nulls, then you would see this as very flexible!
I know this doesn't answer your question, but you could probably write a
little "C" program to strip out the extra white space. If there are a fixed
number of spaces in the record, it may be easier to use sed or awk.
Anyway...good luck,
STEVE
--
____ ___ ________ ________
/_ _] /_ ]/ ______)/ ______) _/| Steve Morrow, Sr. Programmer/Analyst
/ _/ / / / (____ / /___ _/ | University of South Florida
/ _/ / / \\____ ) / _____) _/ | Internet: smorrow@dotrisc.cfr.usf.edu
/ _/___/ / ______/ / / / _/ | Voice : (813) 974-6889
(_________)(________)(___)______/ |______________________________________