Page 1 of 1

Special characters in column name

Posted: Fri Jan 16, 2009 12:33 am
by braj
Hi All

I want to insert records into a db2 table which is having special character '@' in its name. The column names also contains the same special character in it. For example, table name is SS@CRM and columns in this table are Z@CTCD.
I need to insert into this table using db2 enterprise stage. Since the metadata can not have special characters in its name.

I am using DataStage 7x PX.

How can we handle this. Suggestions are most welcome on this.

Thanks,

Posted: Fri Jan 16, 2009 1:08 am
by ray.wurlod
Welcome aboard.

Try enclosing the column name in double quotes. (You may require user-defined SQL for this.)

Posted: Fri Jan 16, 2009 2:00 am
by braj
ray.wurlod wrote:Welcome aboard.

Try enclosing the column name in double quotes. (You may require user-defined SQL for this.) ...
Thanks for reply ray. But it did not work..It is still showing the same error message...Any other suggestions...

Posted: Fri Jan 16, 2009 5:32 am
by ray.wurlod
We can't deal with "not working". It's inexact. Please post the exact error message that you get.

Meanwhile consider creating a synonym for this column, where the synonym does not have any special characters in its name. Use the synonym in your job design.

Posted: Sun Jan 18, 2009 10:18 pm
by braj
[quote="ray.wurlod"]We can't deal with "not working". It's inexact. Please post the exact error message that you get.

Meanwhile consider creating a synonym for this column, where the synonym does not have any specia ...[/quote]

Hi

Please find below the error message I got when tried to enclose column name within duoble quotes.

Error: The name must begin with an alphabetic character and consist of alpha-numerics, underscores, and periods only.

Thanks,
Brajesh

Posted: Wed Jan 21, 2009 7:07 am
by braj
braj wrote:
ray.wurlod wrote:We can't deal with "not working". It's inexact. Please post the exact error message that you get.

Meanwhile consider creating a synonym for this column, where the synonym does not have any specia ...
Hi

Please find below the error message I got when tried to enclose column name within duoble quotes.

Error: The name must begin with an alphabetic character and consist of alpha-numerics, underscores, and periods only.

Thanks,
Brajesh
Hi

Can anyone advise on this.

Regards
Brajesh

Posted: Wed Jan 21, 2009 8:24 am
by stefanfrost1
What read method and what write method are you using? have you imported the table definitions into datastage? And if so using what importer?

Posted: Wed Jan 21, 2009 11:57 am
by ray.wurlod
Have you tried creating a synonym for the column name (in the database's table definition) and using that?

Posted: Mon Jan 26, 2009 11:59 pm
by braj
ray.wurlod wrote:Have you tried creating a synonym for the column name (in the database's table definition) and using that? ...
Hi

I can not creat a synonym for any object. I want to use this table only (No synonym/ views)..

Posted: Tue Jan 27, 2009 3:25 am
by ray.wurlod
If the database vendor's client software won't permit it, then tough.

Posted: Thu Jan 29, 2009 4:06 am
by fareeda_b
Hi braj,

Try this Field(column_name,"@",2)

Example :
column name:Z@CTCD

special character position is 2

Field(Z@CTCD,"@",2) it will work in transformer stage

Thanks
fareeda

Posted: Thu Jan 29, 2009 3:12 pm
by ray.wurlod
They don't want to process the column name - they want to use the column name in metadata!