June 6, 2012 at 3:13 am
Hi Friends,
I have written a function which i would like to use in ssis...
I don't know how to call the function....?
CREATE FUNCTION [dbo].[GetDateTimeAdd](@Date varchar(8), @sec smallint)
RETURNS datetime
WITH EXECUTE as CALLER
as
BEGIN
DECLARE @FullDttm datetime
If
@Date = '0'
or
ISDATE(substring(@Date, 5,2) + '/' + substring(@Date, 7,2) + '/' + left(@Date,4)) = 0
Set @FullDttm = '1/1/1900'
Else
set @FullDttm =
substring(@Date, 5,2) + '/' + substring(@Date, 7,2) + '/' + left(@Date,4)
SET @FullDttm = dateadd(SECOND, @sec, @FullDttm)
RETURN (@FullDttm)
END;
this is my function and i have to call in 2 methods
select dbo.GetDateAdd(INCALD,0) -- INCALD is a Column
select dbo.GetDateAdd(INCALD,Row_number() over(partion by column order by column) + select max(SequenceNumber) from table)
and is that possible to achieve row_number partition in ssis...? i know we can use Sort transformation but we can't get the values to be used in rows like we do in SQL if i am not wrong...
Ho can i achieve this?
Could you Help me, Friends...?
Any suggestions would be really appreciated...
Thanks,
Charmer
June 7, 2012 at 8:15 am
What i can think of
Use OLE DB Source and select either 'SQL Command from variable' and 'SQL Command'
In 'SQL command' you can execute the same syntax that you use in Management Studio in 'SQL Command text'
Ex:SELECT * FROM fnGetInfo(12)
In the case of 'SQL Command from variable' you need to store the query in a variable call it
Create a variable of string type and enter the SQL syntax (SELECT * FROM fnGetInfo(12)) in value and call it
June 7, 2012 at 8:57 am
Smash125 (6/7/2012)
What i can think ofUse OLE DB Source and select either 'SQL Command from variable' and 'SQL Command'
In 'SQL command' you can execute the same syntax that you use in Management Studio in 'SQL Command text'
Ex:SELECT * FROM fnGetInfo(12)
In the case of 'SQL Command from variable' you need to store the query in a variable call it
Create a variable of string type and enter the SQL syntax (SELECT * FROM fnGetInfo(12)) in value and call it
Thanks for the response, smash....
Could you tell me how can we use partition in ssis? i mean not through T-SQL statements...
Thanks,
Charmer
December 14, 2020 at 11:49 am
There are several important benefits to expressing your behavior in SSIS code.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply