Re: ORA-01460 error

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: Wed, 22 Oct 2008 21:02:23 -0700 (PDT)
Message-ID: <7bea09b6-3e9a-4821-978a-9e98fa1d8065@79g2000hsk.googlegroups.com>


On Oct 22, 10:49 pm, "Vladimir M. Zakharychev" <vladimir.zakharyc..._at_gmail.com> wrote:
> On Oct 22, 10:13 pm, blindsey <blind..._at_dsicdi.com> wrote:
>
>
>
> > On Oct 22, 2:08 pm, "Vladimir M. Zakharychev"
>
> > <vladimir.zakharyc..._at_gmail.com> wrote:
> > > On Oct 22, 9:36 pm, blindsey <blind..._at_dsicdi.com> wrote:
>
> > > > On Oct 22, 1:35 pm, blindsey <blind..._at_dsicdi.com> wrote:
>
> > > > > I'm trying to load images into an Oracle table using this technique:
>
> > > > >http://www.dba-oracle.com/oracle_news/2005_5_11_easy_top_loading_imag...
>
> > > > > SQLLDR is kicking back all rows with the error "ORA-01460:
> > > > > unimplemented or unreasonable conversion requested."
>
> > > > > Any ideas?  How to get around/fix?
>
> > > > It's Oracle 10.2.0.1.0, by the way.
>
> > > And your table DDL and SQL*Loader control file are...?
>
> > > Regards,
> > >    Vladimir M. Zakharychev
> > >    N-Networks, makers of Dynamic PSP(tm)
> > >    http://www.dynamicpsp.com
>
> > Exactly as in the linked example, except for the filenames, which are
> > jpgs instead of gifs. (and changing the second "file_id" to
> > "file_data", which is an obvious error).
>
> It seems that example has another error in it: since fields are
> terminated by ',' and there are three fields being loaded, file name
> field MUST also be terminated by a comma, that is, the data section
> should look like this:
>
> BEGINDATA
> 1,C:\John.gif,
> 2,C:\smith.gif,
> 3,C:\sandra.gif,
>
> This probably is the source of the ORA-1460.
>
> Regards,
>    Vladimir M. Zakharychev
>    N-Networks, makers of Dynamic PSP(tm)
>    http://www.dynamicpsp.com

...and I completely overlooked that INTEGER vs INTEGER EXTERNAL issue, which is actually causing the error. Not only INTEGER(5) is an incorrect specification, because its length can only be a power of 2, but the data itself is not binary, so no wonder Oracle has problems converting it. I sometimes wonder why DB posts stuff on his sites without any validation whatsoever...

Regards,

   Vladimir M. Zakharychev
   N-Networks, makers of Dynamic PSP(tm)    http://www.dynamicpsp.com Received on Wed Oct 22 2008 - 23:02:23 CDT

Original text of this message