Results 1 to 11 of 11
Jun 19, 2002, 07:23 #1
- Join Date
- Feb 2001
- Pittsburgh, PA
- 0 Post(s)
- 0 Thread(s)
Combining two fields in MSSQL for search.
I'm working on a project where I want to search multile fields in a table based on user input. Is there a way to combine these fields in my SELECT statement (with an AS clause) so I can only do a WHERE clause on one field?
For instance, if I have a firstName and lastName field and I want to search by full name, I want to do something like:
SELECT (firstName & ' ' & lastName) as fullName WHERE fullName LIKE '%lee%';
I know that I could search both fields using an AND joiner, but I'm talking about 10 fields or so, and I'd like to just be able to join them into one search field.