cancel
Showing results for 
Search instead for 
Did you mean: 

Add Column to existing table

former_member241220
Participant
0 Kudos

Hi All,

I would like to add a column to an existing table without the database.

Here my scenario is I have source having 25 columns at the same time my target having 24 columns, I have to add the new column in the target table. I do not have database access, my superior saying can do it through BODS designer. anybody help on this?

Thanks

Murali.

Accepted Solutions (1)

Accepted Solutions (1)

former_member187605
Active Contributor
0 Kudos

Use a template table.

All details are in section 2.3.28 of the SAP Data Services Reference Guide.

former_member241220
Participant
0 Kudos

Hi Dirk,

Thanks for your swift reply.

The job is there in production and I could not use template table in this scenario.I have to add column to existing permanent table only. Please help is there any option we can add column to permanent table with out database.

Thanks

Murali

Former Member
0 Kudos

Hello Murali,

Double click the permanent table and do a right click on an existing column and select New Column and then above or below the existing column. I think you should know the database structure and put the columns in the right order.

I am running SAP Data Services 4.2 SP7 and the datastore is pointing to SQL Server db.

Best Regards,

Bogdan

former_member241220
Participant
0 Kudos

Hi Bogdan,

Thanks for your reply,

If i add column in bods, the column will reflect in database(Sql Server) automatically?

Thanks

Murali

former_member208402
Active Contributor
0 Kudos

Hi Murali,

Take a script before and write sql function like below

sql('KFTDS_DS_STG','ALTER TABLE ST_SHIPS_BEARING1 ADD FLAG varchar(4) NULL');

now add a column in target table in bods as suggested by Bogdan.

and map the source column to target column,

I tried this and it worked for me.

Thanks,

Ravi kiran.

Former Member
0 Kudos

Hello Murali,

Only Template table object can create table structures in the underlying database. Permanent tables don't create table structures. What Ravi suggest might work, but I would follow a better approach by asking the database owner to create the additional column for you in the database and tell you the name and datatype. And the same you create in BODS how I suggested first.

Regards,

Bogdan

former_member241220
Participant
0 Kudos

Hi Ravi,

The way you suggested might work, but I think it is not better approach what Bogdan suggest, why means, suppose in our job if we have lot of dataflows(for ex:10), for change target structure in one target table, we have to run whole job.

another way is create a sample job and run the script only. but it will best when we are working development but in Production do we have any other alternative option?

Thanks

Murali

Answers (0)