Re: LOAD DATA
Posted in 2001
Topics: Stored Procedures & SPL, Migration, Import/Export & Data Conversion
Can you try: tail <unload-filename> | od -cb
The last two characters should be a pipe and a new-line character, like:
S c
123 143
0001300 r e e n . M i n d . B o t h
162 145 145 156 056 040 115 151 156 144 056 040 102 157 164 150
0001320 a r e b l a n k . | \\n
040 141 162 145 040 142 154 141 156 153 056 174 012
0001335
You may be mising the final linefeed?
(In later versions, I think the last pipe is optional.) What version of
I-SQL are you using? (dbload -v)
Does each row contain the same number of fields? If you don't have
BLOBS in your data try:
cat <filename> | tr -cd '|\\012' | uniq -c
16 ||||
It should return a one line display showing the number of lines in your
file, and just the pipes from one line:
But it sounds like you have character data in your Money field.
Do some rows load with dbload? and the bad rows go to your error file?
smithj48@my-deja.com wrote:
>
> It is pipe-delimited. I am having problems with dbload it keeps
> compaining about a bad eof. There is nothing after the last peice of
> data (That I can find. The files are being produced from an Oracle
> DB).
>
> I also have problems with one piece of data. It is that last entry on
> each row (money field), and is a defined as Money in the table but when
> I try loading it complains about unable to convert the type. I have
> tried using decimal but I get the same error, but if I use Char it
> loads!!!
>
>
> In article <95439e$cj7$1@news.xmission.com>,
> Colin McGrath <cmm@trac3000.ueci.com> wrote:
> >
> > Is it in CSV format or is it pipe-delimited?
> > If CSV, do you want to get rid of the quotes around the character
> fields
> > before you load?
> >
> > What's wrong with dbload?
> >
> > smithj48@my-deja.com wrote:
> > >
> > > Does anyone know of another way to load tables other than using
> DBLOAD?
> > >
> > > I have data from Oracle in CSV format ("|" delimited) being loaded
> into
> > > IFX 9
> > >
> > > Cheers
> > >
> > > James
> >
> > --
> > Colin
> >
>
>
> Sent via Deja.com
> http://www.deja.com/
>
>
--
Colin McGrath colin.mcgrath@wgint.com
Washington Group International, Inc. 010-1-215-422-4144
Philadelphia, PA, USA 19103 FAX: 010-1-215-422-1445
Any opinions I state are my own and not necessarily those of my employer
Colin
This is what I get on the tail:
116 174 174 174 174 174 174 174 174 174 174 156 157 156 055 162
0004060 u n n e r | | | | | \\r \\n
165 156 156 145 162 174 174 174 174 174 015 012
0004074
I am also using version 7.30.UC1, but next week I will be doing it on
9.x depending what is installed.
Also there are no Blobs, it is all numeric or text based.
Cheers
James
In article <954hbc$h3p$1@news.xmission.com>,
Colin McGrath <cmm@trac3000.ueci.com> wrote:
>
> Can you try: tail <unload-filename> | od -cb
>
> The last two characters should be a pipe and a new-line character,
like:
>
S c
> 123
143
> 0001300 r e e n . M i n d . B o
t h
> 162 145 145 156 056 040 115 151 156 144 056 040 102 157 164
150
> 0001320 a r e b l a n k . | \\n
> 040 141 162 145 040 142 154 141 156 153 056 174 012
> 0001335
>
> You may be mising the final linefeed?
> (In later versions, I think the last pipe is optional.) What version
of
> I-SQL are you using? (dbload -v)
> Does each row contain the same number of fields? If you don't have
> BLOBS in your data try:
>
> cat <filename> | tr -cd '|\\012' | uniq -c
>
> 16 ||||
>
> It should return a one line display showing the number of lines in
your
> file, and just the pipes from one line:
> But it sounds like you have character data in your Money field.
> Do some rows load with dbload? and the bad rows go to your error file?
>
> smithj48@my-deja.com wrote:
> >
> > It is pipe-delimited. I am having problems with dbload it keeps
> > compaining about a bad eof. There is nothing after the last peice
of
> > data (That I can find. The files are being produced from an Oracle
> > DB).
> >
> > I also have problems with one piece of data. It is that last entry
on
> > each row (money field), and is a defined as Money in the table but
when
> > I try loading it complains about unable to convert the type. I have
> > tried using decimal but I get the same error, but if I use Char it
> > loads!!!
> >
> >
> > In article <95439e$cj7$1@news.xmission.com>,
> > Colin McGrath <cmm@trac3000.ueci.com> wrote:
> > >
> > > Is it in CSV format or is it pipe-delimited?
> > > If CSV, do you want to get rid of the quotes around the character
> > fields
> > > before you load?
> > >
> > > What's wrong with dbload?
> > >
> > > smithj48@my-deja.com wrote:
> > > >
> > > > Does anyone know of another way to load tables other than using
> > DBLOAD?
> > > >
> > > > I have data from Oracle in CSV format ("|" delimited) being
loaded
> > into
> > > > IFX 9
> > > >
> > > > Cheers
> > > >
> > > > James
> > >
> > > --
> > > Colin
> > >
> >
> >
> > Sent via Deja.com
> > http://www.deja.com/
> >
> >
>
> --
> Colin McGrath colin.mcgrath@wgint.com
> Washington Group International, Inc. 010-1-215-422-4144
> Philadelphia, PA, USA 19103 FAX: 010-1-215-422-1445
> Any opinions I state are my own and not necessarily those of my
employer
>
Sent via Deja.com
http://www.deja.com/