I have a user defined table type:CREATE TYPE [ENUM].[str_list_tbltype] AS TABLE( [STR_NAME] [varchar](100) NOT NULL)GO
This comes into the stored procedure as the parameter:@STR_IDs dbo.str_list_tbltype READONLY,
There is a table, call it idTable and it's data is:PK Co IDStr1 4 A32 8 B53 7 4X4 8 G45 8 B4Here is a simple select for that table:SELECT * FROM idTable WHERE Co = 8
Let's say @STR_IDs contains B5 and B4What I need is to compare using @STR_IDsWithout using a cursor, is there an easier way to do this?Find out if each and every string in @STR_IDs exists in idTableWhere Co = 8Something like:IF EXISTS(SELECT * FROM idTable WHERE Co = 8 AND IDStr IN (SELECT STR_NAME FROM @STR_IDs)
Thanks,Zath