SQL LOADER [message #407445] |
Wed, 10 June 2009 03:54 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #407458 is a reply to message #407450] |
Wed, 10 June 2009 04:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #407555 is a reply to message #407458] |
Wed, 10 June 2009 08:24 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
joy_division
Messages: 4963 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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #407612 is a reply to message #407577] |
Wed, 10 June 2009 13:03 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
joy_division
Messages: 4963 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?
|
|
|