dbTalk Databases Forums  

Call function to fill column in DTS tranformation

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Call function to fill column in DTS tranformation in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AshleyT
 
Posts: n/a

Default Call function to fill column in DTS tranformation - 06-08-2004 , 08:06 AM






I have a transformation that I copy over the contents of a dbase table. I have added a column and would like to call a function that returns a value based on the sku, and storeno in that dbase table. So I call the function in query analyzer as so

select dbo.SKUAverageCostPerStore (@sku, getdate(), @storeno

* returns a float AVG_COST which goes into column AVERAGE_COS

I can get the @sku, @storeno from the record that I have am transforming into a sql table

How can I call this function to return the AVG_COST and then map that to the column AVERAGE_COST

Thanks for the help



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Call function to fill column in DTS tranformation - 06-08-2004 , 02:34 PM






You could use a plain and simple SQL Query right?

How about lookups

How to Use Lookups in DTS
(http://www.sqldts.com/default.aspx?277)

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"AshleyT" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a transformation that I copy over the contents of a dbase table. I
have added a column and would like to call a function that returns a value
based on the sku, and storeno in that dbase table. So I call the function
in query analyzer as so:
Quote:
select dbo.SKUAverageCostPerStore (@sku, getdate(), @storeno)

* returns a float AVG_COST which goes into column AVERAGE_COST

I can get the @sku, @storeno from the record that I have am transforming
into a sql table.

How can I call this function to return the AVG_COST and then map that to
the column AVERAGE_COST?

Thanks for the help.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.