Hi all,
I'm trying to use sqlloader to import a database with multiple
different tables which has been exported to one single plain text
file. No fixed lenght. Let's say database.txt is something like
fruits,orange,o range
fruits,banana,y ellow
fruits,pear,gre en
users,John Doe,25,34,26th upper street,0, 12-2-2003
users,Fred Flinstone, 24,5,14th Downing Lane,1,1-7-2002
¿Is it possible to try an approach based on WHEN statements? I mean:
LOAD DATA
INFILE database.txt
FIELDS TERMINATED BY ','
WHEN (first field is 'fruits')
(name, color)
WHEN (first field is 'users')
(name, age, visits, address, active, since)
I only whant to know if it is possible or not, but will wellcome
advice in ctl file sintax.
Thanks in advance and best regards
I'm trying to use sqlloader to import a database with multiple
different tables which has been exported to one single plain text
file. No fixed lenght. Let's say database.txt is something like
fruits,orange,o range
fruits,banana,y ellow
fruits,pear,gre en
users,John Doe,25,34,26th upper street,0, 12-2-2003
users,Fred Flinstone, 24,5,14th Downing Lane,1,1-7-2002
¿Is it possible to try an approach based on WHEN statements? I mean:
LOAD DATA
INFILE database.txt
FIELDS TERMINATED BY ','
WHEN (first field is 'fruits')
(name, color)
WHEN (first field is 'users')
(name, age, visits, address, active, since)
I only whant to know if it is possible or not, but will wellcome
advice in ctl file sintax.
Thanks in advance and best regards
Comment