April 13, 2011 at 7:29 am
Hi,
1) Can anyone let me know how to pass paremeters in SSIS packages.
2) I have a function. I want to write that function using SSIS .Please let me know how to do that . Below is the function:
ALTER FUNCTION [dbo].[GetReportingPeriodID]
(
@ReportingFrom datetime,
@ReportingTo datetime
)
RETURNS INT
AS
BEGIN
DECLARE @RepALTER FUNCTION [dbo].[GetReportingPeriodID]
(
@ReportingFrom datetime,
@ReportingTo datetime
)
RETURNS INT
AS
BEGIN
DECLARE @ReportingPeriodID INT
Select @ReportingPeriodID=ReportingPeriodID from ReportingPeriod
where FromDate=@ReportingFrom And ToDate=@ReportingTo
RETURN @ReportingPeriodID
ENDortingPeriodID INT
Select @ReportingPeriodID=ReportingPeriodID from ReportingPeriod
where FromDate=@ReportingFrom And ToDate=@ReportingTo
RETURN @ReportingPeriodID
END
Thanks & Regards,
Bhavika
April 13, 2011 at 12:33 pm
noyt sure I completely understand what your trying to do, but I'll take an estimated guess at two possibilities:
1 - you want to call the functions from the database within SSIS:
a) if this the case, you would need to first set a Package variable with the required value
b) need to use a Script task component specifing the SQL as in the direct input (unless you build this up in a variable expression), then where you would put your normal value in an SQL statement put a ?
c) Map your package variables in the parameter mapping section of the SQL Task. - this will need to be in order and iterate as 0,1,2,3 etc for the parameter.
d) specify your result set and map that to a package variable.
2 - you want to replicate what the function does as a package:
In this case it's down to designing a suitable process and using package variables to hold your values where needed.
I believe point 1 is what your probably looking for though.
_____________________________________________________________________________MCITP: Business Intelligence Developer (2005)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply