Home » RDBMS Server » Server Utilities » SQL LOADER (Release 9.2.0.7.0)
icon4.gif  SQL LOADER [message #407445] Wed, 10 June 2009 03:54 Go to next message
vags76
Messages: 12
Registered: February 2009
Junior Member
HELLO ALL

I am trying to set up an SQL*Loader using fixed length files and I get following error:

SQL*Loader-350: Syntax error at line 16.
Expecting valid column specification, "," or ")", found "CDBCR".
CDBCR POSITION (42:43) CHAR, "DECODE(:CDBCR,'CR','D
^

syntax of the above column is as follows:

CDBCR POSITION (42:43) CHAR, "DECODE(:CDBCR,'CR','DR':CDBCR)"

and I tried that syntax too CDBCR CHAR terminated by ',', and I get following error

Expecting valid column specification, "," or ")", found "CDBCR".
CDBCR CHAR terminated by ',',


Could please someone advice of what should the syntax of that column be?


Regards
Re: SQL LOADER [message #407450 is a reply to message #407445] Wed, 10 June 2009 04:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Copy and paste the WHOLE control file.

Regards
Michel
Re: SQL LOADER [message #407458 is a reply to message #407450] Wed, 10 June 2009 04:47 Go to previous messageGo to next message
vags76
Messages: 12
Registered: February 2009
Junior Member
Michel
here is the control file

Load Data
Replace

INTO TABLE RRGSTD
(
IDCP1 POSITION (1:11) CHAR, "DECODE(:IDCP1,'GR','ER')",
NCBNK POSITION (12:41) CHAR
CDBCR POSITION (42:43) CHAR "DECODE(:CDBCR,'CR,'DR':CDBCR)",
MTREG POSITION (44:58) DECIMAL
EXTERNAL, "REPLACE :MTREG,',','.':MTREG),
CODEV POSITION (59:61) CHAR,
DAREG POSITION (62:69) DATE 'YYYYMMDD',
DAVAL POSITION (70:77) DATE 'YYYYMMDD',
LIREG POSITION (78:95) CHAR,

)

Please advice
Re: SQL LOADER [message #407481 is a reply to message #407458] Wed, 10 June 2009 05:37 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
A comma is wrongly placed at the first line after "(".
A comma is missing at the end of the second line.

Regards
Michel

[Updated on: Wed, 10 June 2009 05:38]

Report message to a moderator

Re: SQL LOADER [message #407489 is a reply to message #407481] Wed, 10 June 2009 05:53 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Similar OTN thread is going forever.

By
Vamsi
Re: SQL LOADER [message #407555 is a reply to message #407458] Wed, 10 June 2009 08:24 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
vags76 wrote on Wed, 10 June 2009 05:47


Please advice


You really don't know the basics of balanced quotes and parenthesis, and missing and extra commas. Put a syntactically correct control file first before you try to debug other errors.

Bases on the other thread that Vamsi pointed out, you keep making the same mistake over and over again. You do know Einstein's definition of insanity, don't you?
Re: SQL LOADER [message #407577 is a reply to message #407555] Wed, 10 June 2009 10:46 Go to previous messageGo to next message
vags76
Messages: 12
Registered: February 2009
Junior Member
Thank you very much for your advice

Fist thanx for your reply but...:

1)If I knew the basics of quotes and if I wasnt a newbie in that, I would definitely cope on my own build the control file i want and made it workable.

2)However Vamsi pointed out an OTN forum thread. But It happened to be the one I posted and waited for an advice. I might be insane but I would have definitely seen that the OTN thread with the one here are EXACTLY the same and wouldnt be ironic to a newbie looking for help.

I you dont hesitate to bother with my thread, you could have said so, instead of being sarcastic and ironic blaming to appear here as an expert


i m really sorry today to check that this forums doesnt help newbies and is for experts that know everything and dont want to share....


Shame!!!!

Re: SQL LOADER [message #407598 is a reply to message #407577] Wed, 10 June 2009 11:30 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Did you read my answer?

I should add a comma is missing in the third and a parenthesis in the fifth one as well as a comma and a comma is too much in this same line.
Last line before ) contains a comma when it should not.

This seems to justify others' replies, you have an average of one error per line that you could correct by yourself just taking care of what you write.

Shame on you!!!

Regards
Michel
Re: SQL LOADER [message #407612 is a reply to message #407577] Wed, 10 June 2009 13:03 Go to previous message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
vags76 wrote on Wed, 10 June 2009 11:46


1)If I knew the basics of quotes and if I wasnt a newbie in that, I would definitely cope on my own build the control file i want and made it workable.


Sorry, I'm not buying that. With a line like this
EXTERNAL, "REPLACE :MTREG,',','.':MTREG),
this doesn't really have anything to do with being a newbie.

You have unbalanced parenthesis and unbalanced double quotes. I'll admit that a newbie might not know that the first comma is incorrect, but the other two items a plain common sense.

Quote:

2)However Vamsi pointed out an OTN forum thread. But It happened to be the one I posted and waited for an advice. I might be insane but I would have definitely seen that the OTN thread with the one here are EXACTLY the same and wouldnt be ironic to a newbie looking for help.



Then why did you the same question here with the same errors hours after you had the answers from OTN?
Previous Topic: Moving whole database to a new site
Next Topic: ORA-06502: PL/SQL: numeric or value error in EXPDP
Goto Forum:
  


Current Time: Sat Dec 10 05:02:35 CST 2016

Total time taken to generate the page: 0.10861 seconds