year and month in oracle 9i dirct load

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ratikmishra1
Charter Member
Charter Member
Posts: 42
Joined: Wed Aug 18, 2004 2:49 pm

year and month in oracle 9i dirct load

Post by ratikmishra1 »

i am tying to load a table via dirct load. This table has year and month column. While running the job sqlloader abends with invalid keyword error message (as I have columns named as year and month). I can write a custome sqlloader control file to load the data by putting quotes around year adnd month columns). I'd like to use the datastage oracle enterprise stage to do the load. Is there any way to quote the column names. I tried providing select list where the column names are quoted. it does not work.
Will appreciate any help.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Those are reserved words and must be double-quoted if you want to use them in a sqlldr control file.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ratikmishra1
Charter Member
Charter Member
Posts: 42
Joined: Wed Aug 18, 2004 2:49 pm

Post by ratikmishra1 »

How do I do that in the oracle enterprise stage. Is there any option setting that allows me to put quotes in the column names?

Thanks
Rati
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Convert the SQL to custom SQL and add the double quotes.
ratikmishra1
Charter Member
Charter Member
Posts: 42
Joined: Wed Aug 18, 2004 2:49 pm

Post by ratikmishra1 »

Custom SQL?
I am talking about direct load option in OracleEnterprise stage in 7.5 parallel. Are you talking about a different stage?
I 've chosen the Write method=Load and Write mode=Append. And with this setting I am unable to see any way to enter custom SQL. Am I missing something?

Thanks
Rati
ratikmishra1
Charter Member
Charter Member
Posts: 42
Joined: Wed Aug 18, 2004 2:49 pm

Post by ratikmishra1 »

Custom SQL?
I am talking about direct load option in OracleEnterprise stage in 7.5 parallel. Are you talking about a different stage?
I 've chosen the Write method=Load and Write mode=Append. And with this setting I am unable to see any way to enter custom SQL. Am I missing something?

Thanks
Rati
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

ratikmishra1 wrote:... Am I missing something?
Nope, I did. How about declaring DB/2 synonyms for the columns that use reserved words?
ratikmishra1
Charter Member
Charter Member
Posts: 42
Joined: Wed Aug 18, 2004 2:49 pm

Post by ratikmishra1 »

Oracle synonyms are at table level not at column level. So that option is not available.
Post Reply