Showing posts with label destination. Show all posts
Showing posts with label destination. Show all posts

Thursday, March 8, 2012

Adding new Guid to destination

Source table has two fields, int and string. Destination has three fields, int, string and Uniqueidentifier (Guid). For each source row added to the destination, I need to add a new Guid. I know how to make a new Guid in VB.NET script, but how do I inject it into the transformation for each row. I see the “foreach loop container” component and I suspect I need to use it, but I am stumped. Any help would be most appreciated

Paul SullivanUse script component in the DataFlow (added between source and destination). When you edit it, mark your guid column as read/write input column and in the script template write something like

Row.MyGuid = ...|||

Hi,

I have the same task as you have.

Did you make the script component for adding Guid to each source row?

Could you please help me to understand it?

If you could share some source code and some settings for it - would be great!

Thanks.

|||

Vita wrote:

Hi,

I have the same task as you have.

Did you make the script component for adding Guid to each source row?

Could you please help me to understand it?

If you could share some source code and some settings for it - would be great!

Thanks.

Imports System

.

.

.

.

Row.MyGuid = System.Guid.NewGuid()

Regards

Jamie

|||

I did not think that configuration for it would be so easy.

Thanks a lot.

Adding new Guid to destination

Source table has two fields, int and string. Destination has three fields, int, string and Uniqueidentifier (Guid). For each source row added to the destination, I need to add a new Guid. I know how to make a new Guid in VB.NET script, but how do I inject it into the transformation for each row. I see the “foreach loop container” component and I suspect I need to use it, but I am stumped. Any help would be most appreciated

Paul SullivanUse script component in the DataFlow (added between source and destination). When you edit it, mark your guid column as read/write input column and in the script template write something like

Row.MyGuid = ...|||

Hi,

I have the same task as you have.

Did you make the script component for adding Guid to each source row?

Could you please help me to understand it?

If you could share some source code and some settings for it - would be great!

Thanks.

|||

Vita wrote:

Hi,

I have the same task as you have.

Did you make the script component for adding Guid to each source row?

Could you please help me to understand it?

If you could share some source code and some settings for it - would be great!

Thanks.

Imports System

.

.

.

.

Row.MyGuid = System.Guid.NewGuid()

Regards

Jamie

|||

I did not think that configuration for it would be so easy.

Thanks a lot.

Sunday, February 19, 2012

Adding Dataset Column Values to my Table At the End

Hi,

I am mapping an entity from SQL 2005 to another entity in another system on SQL 2000. Since the destination system has its own ID generator, I want to keep the generated ID for each row of my table in a column of my table in SQL 2005. The new column is in the dataset now , but I don't know how to update my table to have that column values (The OleDbDestination just insert new items.)

Samy

OLE DB Command transform is used to do updates.

You may want to read the last paragraph on this blog post: http://www.sqljunkies.com/WebLog/ashvinis/archive/2005/02/03/7275.aspx

-Jamie