Hi Everyone,
Basically i've got a postcode query problem, i have a column with postcodes like:
abc 123
abcd 123
ab 123
What im trying to do is query only the first set on digits without the 123.
So my output should be:
abc
abcd
ab
Ive used the following technique:
SELECT TRIM(SUBSTRING(dbTest.postCode,1,4)) AS shortPostCode
FROM dbTest
This is not accurate as it chucks out:
abc
abcd
ab 1 <-?
Because im using a substring 1,4 ab 1 happens.
Any solutions please?? any suggestions would be helpful!
Thanks
