Home » RDBMS Server » Server Utilities » SQLLoader to load sequence value in a table...URGENT help needed
SQLLoader to load sequence value in a table...URGENT help needed [message #70220] Mon, 06 May 2002 10:02 Go to next message
Rajesh K
Messages: 8
Registered: March 2002
Junior Member
Hi all,
I am trying to load a table using SQL loader from a delimited data file. I also need to load one of the columns from a oracle sequence. It so happens that the the SQL loader hangs and doesn't start the loading when I include the sequence related column in the control file. I think I am going wrong somewhere in the syntax...
Can anyone please help....ASAP...
The control file that is use is...

LOAD DATA
INFILE '/LOADING/wip_data.txt'
INTO table is_unify_wip
FIELDS terminated by "&#124" enclosed by '"'
( ISWIPID, "iswipid_seq.NEXTVAL",
ISLOCALDBID "rtrim(:ISLOCALDBID)",
ISINSTITUTION "rtrim(:ISINSTITUTION)",
ISLOCALREF "rtrim(:ISLOCALREF)"
)
Re: SQLLoader to load sequence value in a table...URGENT help needed [message #70222 is a reply to message #70220] Mon, 06 May 2002 12:32 Go to previous messageGo to next message
Grant
Messages: 578
Registered: January 2002
Senior Member
Use the loadseq option

loadseq SEQUENCE(MAX,1))

See Utilities manual.
This did not help.... [message #70230 is a reply to message #70220] Tue, 07 May 2002 07:42 Go to previous messageGo to next message
Rajesh K
Messages: 8
Registered: March 2002
Junior Member
Hi Grant , I tried to do what you had suggested as given below....

LOAD DATA
INFILE '/BATCH/11Apr/global_data.txt'
APPEND INTO table is_temp
WHEN ISINSTITUTION <> X'0'
FIELDS terminated by "&#124" enclosed by '`'
(iswipid loadseq SEQUENCE(10000000,1) ,
ISLOCALDBID "rtrim(:ISLOCALDBID)",
ISINSTITUTION "rtrim(:ISINSTITUTION)",
ISLOCALREF "rtrim(:ISLOCALREF)"
)
This gives an error saying that....
SQL*Loader-350: Syntax error at line 6.
Expecting "," or ")", found "loadseq".
(iswipid loadseq SEQUENCE(10000000,1) ,
^
Please help....
Re: SQLLoader to load sequence value in a table...URGENT help needed [message #71169 is a reply to message #70220] Wed, 18 September 2002 13:34 Go to previous message
LC
Messages: 3
Registered: April 2002
Junior Member
Why don't you try using a trigger to insert the sequence # into the destination table. I mean create a trigger with before insert to fill the seq column of the destination table. Hence, in your SQL Loader control file, you do not load any information into this column.

LC
Previous Topic: IMP-00069: Could not convert to environment national character set's handle
Next Topic: 109.problem with duplication
Goto Forum:
  


Current Time: Sat May 04 03:53:40 CDT 2024