Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2008-12-03 : 13:27:27
|
i have a two fields in a table -firstname and last name.When user searches by firstname,lastnamethen the two fields should show up as one in the result.search term : arun,jogiresult: arun jogihow can i do this Thanks in advance |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-03 : 13:30:48
|
[code]select firstname+ ' '+lastnamefrom tablewhere firstname+ ','+lastname = @searchterm[/code] |
 |
|
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2008-12-03 : 15:27:25
|
Hi Visakh 16actually i have the query written as followsselect * from (select customer_nbr,firstname+ ' '+lastname as customer_namefrom customerunioin allselect customer_nbr,null from articles ) as xwhere x.customer_name= @searchterm so in this place i having trouble. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-12-03 : 15:37:16
|
You have a comma in your search string but you do not include comma in your query... E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|