I use this stored proc to select specific postcodes based on the first part. I believe it will fit your requirements.
CREATE PROC dbo.spPostcodePart
@FirstPart varchar(4)
AS
DECLARE @FirstPartLen INT
SET @FirstPartLen = LEN(@FirstPart)
SELECT * FROM MyTable
WHERE...
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.