Re: Specifying datatypes in SQL*Loader, why?
Date: Thu, 07 Feb 2002 22:46:51 GMT
Message-ID: <3C61EB75.3080600_at_maderich.demon.co.uk>
damorgan wrote:
> Probably the fact that SQL*Loader is an antique. A functional antique
> ... but an antique.
>
> Daniel Morgan
>
>
>
> Morten wrote:
>
>
>>I would think, that the loader deduced the data types from >>the table it's inserting into, yet we have the option to >>specify eg. CHAR. I can understand SEQUENCE, DATE (format) >>and such, but why the primitive types - I'm certainly >>missing something here. >> >>Morten >>
>
The data types are the types of the data in the file, not the table. This means that you can SQL*Loader to load binary files if you can work out the file format.
e.g. you have a table with a single numeric row
The file could contain 1 as either:
real numeric information (Hex:0001 binary file)
a text representation of the number 1 ( '1' = ASCII(49) = Hex:0031 )
LOAD DATA (the binary file)
INFILE ...
APPEND
INTO TABLE small_table
FIELDS ...
(
number_column INTEGER
)
OR (the text file)
LOAD DATA
INFILE ...
APPEND
INTO TABLE small_table
FIELDS ...
(
number_column INTEGER EXTERNAL (1)
)
OR (again the text file)
LOAD DATA
INFILE ...
APPEND
INTO TABLE small_table
FIELDS
(
number_column CHAR (1)-- The data in the file is stored as text
)
Received on Thu Feb 07 2002 - 23:46:51 CET