sql - Executing a Table-Valued Function from a Stored Procedure with multiple Table-Valued Parameters being passed through? -
I have a stored procedure that performs some repetitive code, so I used to call a redundant code In the decision to make the ceremony. The problem I am facing is:
Message 137, Level 16, State 1, Process Search, Line 98 should declare the scalar variable "@myTVP"
< / Pre>I am using a simple example of SQL code:
make type [dbo] .textTable_type AS table ([text] [nvarchar] (36)) FUNCTION dbo.Search_fn (@textTable_type READONLY as @myTVP) Click Return as table (SELECT * myTVP) as return [DBO]. [Search] read as textTable_type @ IMTP as Start Search from dbo Search_fn (@myTVP) END Get inserted into textTable_type @TVP values as DETP ('ABC') @TVP values ('123 ') Exec dbo.Search (@myTVP = @TVP) Go Drop Function Search_FN Find Drop Process
If anybody can provide information, then it would be great!
(If you try to run this example, there are some additional errors, but that is the error. The problem is because the stored procedure can not be created.
Thanks .
This works for me (some go
batch delimiter added Gone and deleted stored procedure call to field)
If it does not work for you, then compatibility level of your database Or is it?
Comments
Post a Comment