Showing posts with label udf. Show all posts
Showing posts with label udf. Show all posts

Friday, March 9, 2012

How to call a UDF from expression language?

How to call a UDF from expression language?
(This should help work around the lack of reusability in SSIS, and also the problem that the validator doesn't understand length limits, and I have an incorrect validation warning beause the parse doesn't understand REPLICATE correctly, AFAICT.)
You can't do this Perry.

I dare say extensibility of the expression language is on the cards for the next version.

-Jamie

Wednesday, March 7, 2012

How to Call a sproc from within a UDF that returns a table?

Hi. This is a SQL question.

I am trying to wrap a stored procedure with a UDF so I can do selects against the result. The following doesn't work, but is it possible to do something like:

Create Function test()
returns @.tmptable ( myfieldint)
as
begin
insert into @.tmp (field1)
Exec dbo.MySprocWhichRequires3ParmsAndReturnsATable 5, 6, 10 output
return
end

Thanks

There's a chance something similar to this could work

http://blogs.claritycon.com/blogs/curtis_swartzentruber/archive/2006/04/12/384.aspx