...

View Full Version : SQL Street Address Query



sbgulfcoast
04-14-2008, 07:15 PM
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

Spudhead
04-15-2008, 03:05 PM
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 (http://www.techonthenet.com/sql/like.php) operator.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum