Re: tab as delimiter for load statement
Posted in 1992
In article <1992Apr17.165345.23792@das.harvard.edu> bochner@das.harvard.edu (Harry Bochner) writes:
>The recent discussion of delimiters in output reminds me: there seems to be
>(yet another) minor incompatibility between isql 4.00 and 4.10.UC1. I have
>some scripts that import data files that have columns separated by tabs. My
>script sets up the delimiter using (with a tab between the quotes):
>DBDELIMITER=" "
>export DBDELIMITER
You can also use the DELIMITER clause within the LOAD/UNLOAD statement
itself, BTW...
>and the runs isql on a script that includes LOAD statements. This worked fine
>in 4.00 (and earlier), but with 4.10.UC1 I get an error message:
>
>10099: Invalid delimiter. Do not use '\\\\', hex digits (0-9, A-F, a-f), or space.
> 847: Error in load file line 1.>
>Apparently 4.10.UC1 lumps tab together with space, and doesn't accept tab as a
>delimiter. It's easy, of course, to use sed to change the tabs to '|'s, and then
Heh heh heh... Effective with 4.10.UC1, all whitespace characters were
expressly forbidden. After all, NOBODY would want to use something as silly
as space or tab for a delimiter, right?
WRONG! After several customers complained, the various needs to allow
tabs and spaces as delimiters became obvious. Thus, bug 11743 was born --
4.1's lack-of-backward-compatibility in this context was decided to be
a BAD idea.
This bug has been fixed on several platforms, but it's not in any generic
release before 4.11. Anybody else affected by this can send me email
with their platform info, and I'll let them know the status.
>I don't even have to set DBDELIMITER. But it's a nuisance for anyone who has
>scripts like this; hopefully a future revision of 4.10 can restore the previous
>behavior. Or at least correct the error message to include tab as one of the
>delimiters that isn't allowed ;-)
With the fix, the message now reads:
Invalid delimiter. Do not use '\\\\' or hex digits (0-9, A-F, a-f).
Spaces and tabs are allowed again. Other whitespace characters <CR>, <LF>,
<^L>, <^K> are still disallowed.
>For completeness: this is on a sun4, SunOS 4.1.2.
Good. There is a 4.10.UC2 ISQL, ported on SunOS 4.1.1, available which has
the fix. Assuming you're not on an MP box, you should be OK.
*Don't* get the 4.10.UD1 done on 4.1.2 (MP compatible) -- it lacks this fix.
A 4.10.UD2 for 4.1.2 with this (and other) fixes should follow soon... if I
just quit breaking the makes... ]-:
>Harry Bochner
>bochner@das.harvard.edu
--
Alan Denney aland@informix.com {pyramid|uunet}!infmx!aland
I says, "Earl, this hill can spill us
you better slow down or you're gonna kill us
just make one mistake, and it's the Pearly Gates
for them 85 crates of U.S.D.A.-approved cluckers.
You wanna hit second gear, please?"
-- 'C. W. McCall', "Wolf Creek Pass"