# Problem In Table Name

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

# Problem In Table Name

Post by snassimr »

Hi !!!

I can't solve some problem .

My Table Name contain # and I dont succeed to read data
with SQL that Datastage creates .

It include " from two sides of table name

Does anybodu know how to deal with this problem ?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

snassimr,

the parsing mechansim in DS will attempt to use the # character as a delimiter, so you would have to quote it. How you go about it depends upon which stage you are using - which is it?
dsxdev
Participant
Posts: 92
Joined: Mon Sep 20, 2004 8:37 am

Post by dsxdev »

Hi snassimr,
In DataStage if you use # DS interprets it as start of Job parameter.

When you have a query with job parameters bieng used you use

Code: Select all

SELECT * FROM #SCHEMA#.#TABLE_NAME#
where SCHEMA and TABLE_NAME are job parameters.
to parse # as literal use back slash as escape character and try.

Regards
Happy DataStaging
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, it would be nice to know what database and stage you are asking about. Oracle (and others for all I know) have the ability to handle pound and dollar signs in table names by using the following substitutes:

Code: Select all

# = __035__
$ = __036__
Note that there are two underscores on either side of the numbers. Check the documentation for the specific stage type you are using to see if this is the solution for you.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Try making the tablename as a job parameter and include the '#' as part the of name there.
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

Accordin to datastage table name with # is included
with " " , "Ravle#p" but I want to know how the query should be to get results ob DB2 OS/400
Now the query is hung up with query generated by Datastage
Post Reply