Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Defined Function in SISS

Status
Not open for further replies.

GHolden

Programmer
May 28, 2002
852
GB
Hi

Please bear with me I've been using SSIS for two days now.

We have a data migration routine that is currently a set of stored procedures that pulls data from multiple databases and consolidates it in one database for reporting purposes. I have been asked to move this into SSIS.

One of the issues that we have with the existing databases is that dates are stored in multiple formats throughout.

Currently this is addressed using a udf that converts all the dates to a fixed format during consolidation. So each date is wrapped in this function (unfortunately it is not currently an option to standardise dates throughout).

e.g.

INSERT INTO DestinationTable
SELECT
Field1,
Field2,
udf_cleandate(Table.Field) as CleanedDate
etc...

Is the SSIS so far I have a data source and a I was trying to use a derived column to create the cleaned date. The only way I can see is to recreate the udf_cleandate functionality in every Expression. Is there any way that I can add my udf to the available functions in the right-hand window, or am I going about this all wrong.

I've been googling all day so if anyone can at least point me in the right direction it would be much appreciated.

Cheers, Graham


There are two ways to write error-free programs; only the third one works.
 
You can create custom transforms or you can use a script task to build the functionailty you need. Either way your going to have to do some vb coding.

Paul
---------------------------------------
Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
Hi, I built a custom transform component in C#. Is perfect because now it's added to the SSIS toolbox I can just drag and drop it where ever it's needed.

Thanks for pointing me in the right direction.

Cheers, Graham



There are two ways to write error-free programs; only the third one works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top