This is an extension of an earlier question Goal pass in an array, do an inner join against another list and thereby find the ones that match.
First theres a user Table Type ( dbo.,StriingList is User Defined Table varchar (100)
And it does load but then I try to compare it and I get error- Stored procedure looks like this
ALTER PROCEDURE [dbo].[EAGetSupportedNames]
@List AS dbo.StringList READONLY
SET NOCOUNT ON;
declare @A table ( found varchar(100));
insert into @A(found)
SELECT item FROM @List -- into @A Table ?
SELECT found FROM [dbo].[enDeviceNames] inner join @A on @A.found =[dbo].[enDeviceNames].Name
When I execute to save I get this message
Must declare the scalar variable "@A"
Why scalar ? @A is already declared as a table