Hello Team ,
I Need to pass multiple values in single variable in SQl paramter store procedure.
When im creating Type as variable and declare in SQl paramter . im getting error like Must declare the scalar variable "@GroupName". please help me on this .
CREATE TYPE dbo.GroupName AS TABLE
(
groupnames nvarchar(max)
)
GO
Create PROCEDURE [dbo].[UDP_IMRFGroupViewCount]
(
@GroupName GroupName READONLY
)
BEGIN
SET @GroupName=('SAP1','SAP2','SAP3','SAP4')
SELECT Distinct(GroupName) FROM MasterDataOI where GroupName in(@GroupName)
END