Thread: error on sql loader
03-24-08, 11:06 #1Registered User
- Join Date
- Mar 2008
Unanswered: error on sql loader
I've a csv which I want to load in two oracle tables. I need to do do an insert into the cv_test table first and then into the cv_test_gmi.
I'm having a problem with the IDXACCOUNT field in the cv_test_gmi table. I need to write a select statement there. How would I do that? I'm pasting what I've below. Please help.
INTO TABLE cv_test FIELDS TERMINATED BY ','
FGIVEUP "case when :fgiveup is null then 0
CLEARINGTYPEF CONSTANT 'O',
CLEARINGTYPEO CONSTANT 'O',
INTO TABLE cv_test_gmi
FIRM CONSTANT 'M',
IDXACCOUNT "select idxaccount from cv_test where name= ":NAME" AND MARKET='MARKET'"
I'm getting the below pasted error when I try to run it.
SQL*Loader-350: Syntax error at line 29.
Expecting valid column specification, "," or ")", found ":".
IDXACCOUNT "select idxaccount from cv_test where name= ":NAME"
03-27-08, 13:24 #2Registered User
- Join Date
- Dec 2003
- Oklahoma, USA
Don't put double quotes around :NAME, use single quotes if you are comparing a string... so it should look like this:
IDXACCOUNT "select idxaccount from cv_test where name= ':NAME' AND MARKET='MARKET'"JoeB
save disk space, use smaller fonts