Query Concatenated Field (using SubSonic)
Posted
by jwynveen
on Stack Overflow
See other posts from Stack Overflow
or by jwynveen
Published on 2009-12-10T21:38:51Z
Indexed on
2010/03/27
12:03 UTC
Read the original article
Hit count: 347
Is there a way to query against a concatenated field using MS SQL? For instance, what I want to do is something like:
Select FirstName+' '+LastName as FullName from Attendees where FullName like '%Joe Schmoe%'
The above doesn't work. What I have found works is:
Select * from Attendee where FirstName+' '+LastName like '%Joe Schmoe%'
but I can't figure out how to do that using a SubSonic SqlQuery. I have a number of joins and OR statements added dynamically that I don't want to have to write out the sql manually.
Any help/ideas?
© Stack Overflow or respective owner