Conversion failed when converting the varchar value to data type int
- by desi
*I have a varchar(1000) column declared as field that contains all numbers, as shown below.
And I want to execute the following script. I need this to work please
Declare @PostalCode varchar(1000)=0
set @PostalCode ='7005036,7004168,7002314,7001188,6998955'
Select hl.* From CountryLocation cl
INNER JOIN refPostalCodes pc ON pc.PostalCode = hl.PostalCode
where pc.Postalcode in (@PostalCode) and pc.notDeleted = 1