Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comparing address values (streetnames)
Message
De
30/03/2006 04:07:53
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Comparing address values (streetnames)
Divers
Thread ID:
01109073
Message ID:
01109073
Vues:
49
Hi all!

I've a problem, I need to import values from foxpro into my sql database. No problem so far.
But I've to look for duplicate entries in the database, especially streetnames. The imported data can contain something like 'Airportstreet 16' and this can already be stored in the database like 'Airportst. 16' or 'Airportstr. 16' and so on.
I therefore replace 'street' with 'st' and compare this string with the database entries using LIKE.

The SELECT command is:
cmd = "SELECT ... WHERE street LIKE '" + cStreet +"%' ..."

This command evaluates to:
SELECT ... WHERE street LIKE 'Airportst 16%' ...

which can't be found in the database; it should be "... LIKE 'Airportst% 16' ...".

How could I achieve this?
Any suggestions?

TIA
robert.oh.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform