Groups > Asp .Net > Data Access and ObjectDataSource Control > Re: Quick question, easy "Right Answer"




Quick question, easy "Right Answer"

Quick question, easy "Right Answer"
Wed, 2 Apr 2008 07:12:18 +0000
I am not too up on SQL, so I appreciate the time. Why does this not want to go
into my database?  I am trying to combine two values and have them in one
column.  What would be the correct way to do this?  THANKS! 

'" + FirstName + "' & '""' & '" + LastName +
"'
Post Reply
Re: Quick question, easy "Right Answer"
Wed, 2 Apr 2008 08:21:12 +0000
'" + FirstName + "' & '""' & '" + LastName +
"' 

I think && not work in SQL try to change its to AND

'" + FirstName + "' AND '" + LastName + "' 

Hope Can Help
Post Reply
Re: Quick question, easy "Right Answer"
Wed, 2 Apr 2008 09:43:25 +0000
No, doesn't work. All I am trying to do is show someones first and last name
Post Reply
Re: Quick question, easy "Right Answer"
Wed, 2 Apr 2008 10:37:31 +0000
'" + FirstName + "' & '""' & '" + LastName +
"' 

Change to this  '" + FirstName + "' + '" + LastName + "' 

and for to add in one Column you must give name for that Column So its must Add
>>>> '" + FirstName + "' + '" + LastName + "'
"'As FullName"

So its will give FullName that have 2 Fields will add in 1 Fields 

Hope can Help
Post Reply
Re: Quick question, easy "Right Answer"
Wed, 2 Apr 2008 10:49:08 +0000
Try Like this .. 

Select(Firstname +'  '+ Lastname)as [Name] from [user]
Post Reply
about | contact