Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SQL Street Address Query

    I need to create an asp page with a street address lookup. If someone enters an address I need to see if that address exists. Problem is the address may not always be entered the same, for example:

    123 La Vista
    123 La Vista Ave
    123 La Vista Avenue

    That's the same address but has three possible entries. I'm having trouble writing a SQL statement that will pull all three. Table:

    table: tblUnauth_Address

    Fields:

    id
    street_address
    street_city

    Thanks in advance!
    sb
    Last edited by sbgulfcoast; 04-14-2008 at 07:17 PM.

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Code:
    SELECT street_address FROM tblUnauth_Address WHERE street_address LIKE '123 La Vista%'
    Will return all three of those addresses. It won't return, for example:
    123a La Vista
    123 Vista

    Have a google for SQL wildcard searches and the SQL LIKE operator.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •