I don't know if this helps but here's something I just threw together. There are a few assumptions.
Declare @CSZ as varchar(50)
Set @CSZ = 'san fransisco, CA 19111'
Select replace(substring(@CSZ,1,charindex(',',@CSZ)),',','')
Select replace(substring(@CSZ,charindex(',',@CSZ),4),', ','') --...
You could throw your list into a temp table.
CREATE TABLE #tmpTable (CustomerID INT PRIMARY KEY)
INSERT INTO #tmpTable VALUES (1)
INSERT INTO #tmpTable VALUES (2)
INSERT INTO #tmpTable VALUES (3)
INSERT INTO #tmpTable VALUES (4)
Select * from tblCustomer where CustNumb in (Select CustomerID...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.