fazzfarrell Posted August 16, 2006 Share Posted August 16, 2006 I have set up a seach to match postcodes The postcodes are listed as WS, BB, CA, B etc. The user types in say ws7 3uy I want the resuts to be anything related to WS. I have this as my query: SELECT postcodes.POSTCODE, shops.STORENAME, shops.UNITTYPE, shops.PERSILTEL, shops.PHOTOTEL, shops.ADDRESS1, shops.ADDRESS2, shops.TOWNCITY, shops.COUNTY, shops.POSTCODE, shops.EMAIL, shops.MANAGER, shops.LAUNDRY, shops.LAUNCHDATE, shops.OPENINGHOURS FROM postcodes, shops WHERE postcodes.POSTCODE LIKE colname% AND shops.CODE = postcodes.code But it will only bring up my results if I type WS or BB etc. As soon as I tyoe in the full post code no result! Any one help! Quote Link to comment Share on other sites More sharing options...
king arthur Posted August 16, 2006 Share Posted August 16, 2006 What does the shops.code column have in it? Try posting the actual code you're using. Quote Link to comment Share on other sites More sharing options...
fazzfarrell Posted August 16, 2006 Author Share Posted August 16, 2006 The colum has example: CODE001002004006007008The postcode colum has example:code POSTCODE006 AL014 AL075 AL062 AL041 B042 B058 B079 B Quote Link to comment Share on other sites More sharing options...
otuatail Posted August 16, 2006 Share Posted August 16, 2006 What happens if you just use postcodes.POSTCODE? do you get all the BB's etc.Desmond. Quote Link to comment Share on other sites More sharing options...
fazzfarrell Posted August 16, 2006 Author Share Posted August 16, 2006 No say if I type BB19 3uy it finds nothing. I want to be able to type the full postcode then it search just on the 'BB' part etc.Some postcodes are b19 etc so it just needs to find 'b' Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.