Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I'm using SQL Server 2008

I have concatenated values of two columns(Firstname and lastname) of a table(Person). I want to retrieve all the values based on this names.

I have used this query

SELECT * FROM Person WHERE FirstName+LastName LIKE '[abdulkalam%]';

where abdul is the value of the column Firstname and kalam is the value of LastName .

Thank you in advance
Posted

1 solution

Hi,

Check this ...
SQL
SELECT * FROM Person Where UPPER(RTRIM(LTRIM(FIRSTname))) + UPPER(RTRIM(LTRIM(LastName)))
Like UPPER('abdulkalam%')


Hope this will help you.


Cheers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900