I have a procedure that uses a user defined table type.
I am trying to redeclare the @accountList parameter into a local
variable but it's not working and says that i must declare the
scalar variable @accountList.
this is the line that is having the issue: must declare the
scalar variable @accountList
SET @local_accountList = @accountList
ALTER PROCEDURE [dbo].[sp_DynamicNumberVisits] @accountList AS integer_list_tbltype READONLY
,@startDate NVARCHAR(50)
,@endDate NVARCHAR(50)
AS
BEGIN
DECLARE @local_accountList AS integer_list_tbltype
DECLARE @local_startDate AS NVARCHAR(50)
DECLARE @local_endDate AS NVARCHAR(50)
SET @local_accountList = @accountList
SET @local_startDate = @startDate
SET @local_endDate = @endDate
-------------------------------------------------------
CREATE TYPE [dbo].[integer_list_tbltype] AS TABLE(
[n] [int] NOT NULL,
PRIMARY KEY CLUSTERED
(
[n] ASC
)WITH (IGNORE_DUP_KEY = OFF)
)
GO
Monday, January 20, 2014
How do i declare a user defined table type sproc parameter as a local variable?
Labels:
big loop My VS C#
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment