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,orange
fruits,banana,yellow
fruits,pear,green
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 4 5724
Hallo, BadMan,
look there to find the answer: http://asktom.oracle.com/pls/ask/f?p...:3516903603571
best regards
Ralf
-- lo****@engineer.com (BadMan!) wrote in message news:<8e**************************@posting.google. com>... 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,orange fruits,banana,yellow fruits,pear,green 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 lo****@engineer.com (BadMan!) wrote in message news:<8e**************************@posting.google. com>... 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,orange fruits,banana,yellow fruits,pear,green 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
From looking at the notes and example in the 9.2 Utilities manual it
does not appear that sqlldr is really designed to load different sets
of data into multiple tables. The only expample takes portions of the
same input and places it into different tables, but the input data
format does not change.
It should however be easy to write a C program or Shell script to
split the input file into one file per table based on the first
delimited parameter being the table name: fruits.dat, users.dat,
etc.....
Perhaps a true sqlldr expert will see your post and have time to
respond if there is any practical way to feed multiple layouts to
multiple tables in a single job.
HTH -- Mark D Powell -- Ma*********@eds.com (Mark D Powell) wrote in message news:<26**************************@posting.google. com>... From looking at the notes and example in the 9.2 Utilities manual it does not appear that sqlldr is really designed to load different sets of data into multiple tables. The only expample takes portions of the same input and places it into different tables, but the input data format does not change.
Yap.
It should however be easy to write a C program or Shell script to split the input file into one file per table based on the first delimited parameter being the table name: fruits.dat, users.dat, etc.....
awk is the tool.
But I wanted to know if there was a way to use Oracle-native
platform-independent tools...
Perhaps a true sqlldr expert will see your post and have time to respond if there is any practical way to feed multiple layouts to multiple tables in a single job.
Thank you anyway!
Best regards from spain. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Pat A |
last post by:
We have a dilemma. We are storing our database password in an include
file that resides outside of the web root. The password is in plain
text. So, no one can get that password because it can't...
|
by: B-Dog |
last post by:
I have an old dos program that uses dat files to store the data and I'm
trying to convert to dotnet. I'd like to be able to import the data into an
access database but I don't know which format...
|
by: Brett |
last post by:
If I want to easily swap the database I'm using, what is the best method for
developing that tier in my application?
I'll have basically a 4 tier app:
1. presentation
2. business logic
3. data...
|
by: Netkiller |
last post by:
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Project: Network News Transport Protocol Server Program
Description:
基于数æ®åº“的新闻组,实现BBSå‰ç«¯ä½¿ç”¨NNTPåè®®æ¥è®¿é—®è´´å...
|
by: djhexx |
last post by:
Hello. I have an ASP.NET application (C#) that I allow users to
upload files. Files get stored in a SQL2005 database. The file data
is stored in a varbinary(max) column.
When the user uploads...
|
by: sainiamit25 |
last post by:
Hi,
I want to insert 8 lakh records into one table. Table has got around 25 columns. The table has got indexes but before insertion, the indexes are dropped and after the reocrds are run, the...
|
by: Atli |
last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t.
In situations where your PHP application...
|
by: orajit |
last post by:
Hi am calling sqlloader inlow shell script
#!/bin/sh
sqlldr scott/tiger control=ulcase1.ctl log=ulcase1.log
retcode=`echo $?`
case "$retcode" in
0) echo "SQL*Loader execution successful"...
|
by: BadMan! |
last post by:
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |