Cast varchar as int SQL Server 2005
I have a table [tbl_Controls] that contains the Field [ControlValue] nvarchar(250) (Data Example '1,2,3') w/o the '
If I have a single nuber as (Data Example '1') w/o the ', the query works correctly
I need to filter the following, The field [ProductType_ID] Integer
select ProductType_ID,Category from tbl_ProductsCategories
Where ProductType_ID in (Select Cast (ControlValue as integer) from tbl_Controls where controlid = 17)
|