Guys,
I've got a good candidate for a CLR stored procedure and I need some advice.
The original stored procedure used several while loops and a cursor to
accomplish the task.
I'm trying to convert it to a CLR stored procedure but I'm running into
difficulties.
The procedure used several table variables to store intermediate results and
used those results as sub-selects in other queries using the IN clause.
Example:
DECLARE @table TABLE (
ID uniqueidentifier
)
INSERT INTO @table ( ID )
SELECT ID
FROM MySchema.MyTable
WHERE
MyColumn > SomeValue
SELECT *
FROM Myschema.MyTable2
WHERE
ID IN (SELECT ID FROM @table)
This occurs several times.
What I need to know is this: is it possible to write a CLR stored procedure
to do something similar, i.e., store the results in a "temporary" place and
use those results to generate another query?
Thanks,
Mike
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com