Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking either / or of two fields for query
Message
From
06/01/2010 12:13:07
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
06/01/2010 12:09:34
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01442422
Message ID:
01442429
Views:
28
>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

I should have added, I also have a field for "File_As" where the full name would be in there as an organization name or if an individual it would be last, comma first plus middle. If it is easier to just search in one column.
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform