cancel
Showing results for 
Search instead for 
Did you mean: 

How can i replace column name using reciever JDBC adapter on runtime.

Former Member
0 Kudos

Hi Experts,

I have a problem with reciever JDBC synario.

Target Oracle table has columns named 2 bytes Japanese character like "日本".

Datatype cannot accept 2bytes character as element name.

So, I would like to how to replace column name on runtime.

Please tell me.

Regards,

Shinya Kawaoge

View Entire Topic
Former Member
0 Kudos

You can rename table column name with ALTER TABLE sql command.

To rename a column in an existing table, the ALTER TABLE syntax is:

ALTER TABLE table_name
 RENAME COLUMN old_name to new_name;

You can insert the ALTER TABLE command in a Stored Procedure, and call it from JDBC Channel.

Former Member
0 Kudos

Hi Shinya,

Alternatively, you can also design your receiver interface as follows:

<root>

<StatementName>

<anyName action=u201DSQL_DMLu201D>

<access>alter table <tablename> rename column <old_Column_Name> to <new_Column_Name></access>

</anyName >

</StatementName>

</root>

And this will do the trick for you.

Please take a look at the following URL for your reference:

http://help.sap.com/saphelp_nw73/helpdata/en/44/7b7855fde93673e10000000a114a6b/content.htm

Hope this helps.

Regards, Gaurav