Page 1 of 1

# Problem In Table Name

Posted: Tue May 31, 2005 4:33 am
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 ?

Posted: Tue May 31, 2005 5:03 am
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?

Posted: Tue May 31, 2005 5:37 am
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

Posted: Tue May 31, 2005 6:53 am
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.

Posted: Tue May 31, 2005 8:53 am
by Sainath.Srinivasan
Try making the tablename as a job parameter and include the '#' as part the of name there.

Posted: Tue May 31, 2005 8:55 am
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