Declare @listofIDS table(zipcodeids varchar(10)) Declare...


Please login or register to vote for this query.

(click on this box to dismiss)

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

Declare @listofIDS table(zipcodeids varchar(10))

Declare @ZipCodeIDS varchar(100)
set @ZipCodeIDS= '14'

set @ZipCodeIDS+= ','
;with cte as
select substring(@ZipCodeIDS, 1, charindex(',', @ZipCodeIDS) - 1) num, charindex(',', @ZipCodeIDS) pos
union all
select substring(@ZipCodeIDS, pos + 1, charindex(',', @ZipCodeIDS, pos +1) - pos - 1) num, charindex(',', @ZipCodeIDS, pos +1)
from cte
where charindex(',', @ZipCodeIDS, pos +1) > 0

INSERT @listofIDS 


Enter Parameters

Switch sites:
loading Hold tight while we fetch your results