Passing Parameter value with double quotes

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
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Passing Parameter value with double quotes

Post by Roopanwita »

Hi,
I am trying to read data from an ORACLE table ,the table name is <SCHEMA_NAME>."<TABLE_NAME>"
In the source oracle stage my sql query is:

Code: Select all

SELECT 
COL1,COL2
FROM
REGION."SAMPLE"
BUt the datastage is unable to read the data from the table having table name "SAMPLE"

How can i pass the parameter which is having values with double quotes.

Thanks in Advance
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

Hi

I hope don't give double quotes. from job paramater just u will send Table name without double quotes.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Don't pass the double-quotes in the first place, they are completely unnecessary there unless you have something like <shudder> a mixed-case table name.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Post by Roopanwita »

Thanks for the reply.
But the table name in Oracle is "SAMPLE" so we cann't change the table name.We have to read data from that table.

Thank you once again.
tkbharani
Premium Member
Premium Member
Posts: 71
Joined: Wed Dec 27, 2006 8:12 am
Location: Sydney

Post by tkbharani »

Did you try executing the same from any of the Oracle Client. If it is working then try the same in Datastage. Try to pass the value of the parameter as including double quotes.

But this is not the standard table naming convention.
Thanks, BK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Are you saying the double-quotes are actually part of the table name? :shock: That's hard to believe and a horrible practice if true.

Are you certain? Have you tried the query without them to see if it works that way? Many tools like Toad optionally quote object names like that, the vast majority of the time it isn't needed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Post by Roopanwita »

Thank you for your reply.

Yes , double quote is a part of table name, table is like SCHEMA.AA_"SAMPLE". By describing table defination , I found that table name has quotes.

I tried to select query from a tool , if I am passing table name without quote, the query is not running(invalid table name) and with quote query is running properly

But in datastage same query is not working. I tried to pass without quote in DataStage . That is also not working.

Thank you once again..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try setting the "case sensitive names" property. This, if I recall correctly, adds quotes to identifiers such as table and column names.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yup, that's what it does.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply