Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking either / or of two fields for query
Message
 
 
À
06/01/2010 12:09:34
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01442422
Message ID:
01442428
Vues:
50
>I know I have seen some stuff on here before about this but wasn't paying attention then. I have a contact table with fields for both the first namd and last name plus others of course. I have a form where I want to enter a name and search for all records that this name is LIKE either the first name of the last name. I am using stored procedures. How do I write a stored procedure that would check either first name or last name and return any records that are like those names?
>
>A name entry could be "win" and I would want to find "Winsborough" in the last name column.
>Thanks for any help.
>Tim

You may also read this excellent article about dynamic search http://www.sommarskog.se/dyn-search-2008.html (It is a bit long, but well worth it).
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform