Special characters in column name

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
braj
Participant
Posts: 17
Joined: Mon Dec 08, 2008 2:12 am

Special characters in column name

Post 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,
Braj
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

Try enclosing the column name in double quotes. (You may require user-defined SQL for this.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
braj
Participant
Posts: 17
Joined: Mon Dec 08, 2008 2:12 am

Post 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...
Braj
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
braj
Participant
Posts: 17
Joined: Mon Dec 08, 2008 2:12 am

Post 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
Braj
braj
Participant
Posts: 17
Joined: Mon Dec 08, 2008 2:12 am

Post 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
Braj
stefanfrost1
Premium Member
Premium Member
Posts: 99
Joined: Mon Sep 03, 2007 7:49 am
Location: Stockholm, Sweden

Post 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?
-------------------------------------
http://it.toolbox.com/blogs/bi-aj
my blog on delivering business intelligence using agile principles
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Have you tried creating a synonym for the column name (in the database's table definition) and using that?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
braj
Participant
Posts: 17
Joined: Mon Dec 08, 2008 2:12 am

Post 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)..
Braj
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If the database vendor's client software won't permit it, then tough.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
fareeda_b
Participant
Posts: 48
Joined: Sat Feb 23, 2008 4:25 pm

Post 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
Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

They don't want to process the column name - they want to use the column name in metadata!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply