• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

concatenate to db fields in to one datagrid column

I would like to append first name and last name that appear in 2 fields into 1 field in my datagrid

please help !
0
prowebinteractive
Asked:
prowebinteractive
  • 3
  • 2
1 Solution
 
prowebinteractiveAuthor Commented:
I tried this doesnt seem to work.... im getting a "0" in the field
0
 
DimandjaCommented:
Can you show some code?
0
 
prowebinteractiveAuthor Commented:
       Dim SqlString As String = "SELECT a.accountNumber, SU.fname + ' ' + SU.lname AS repName, p.nom, p.prenom, p.telHome, d.dealerName, ST.statusName AS accountStatus FROM accounts AS a INNER JOIN profiles AS p ON a.accountNumber=p.accountNumber INNER JOIN dealers AS d ON a.dealerId=d.dealerId INNER JOIN sysusers AS SU ON d.repId=SU.sysUserId LEFT JOIN accountStatus AS ST ON a.accountStatus=ST.statusId WHERE p.profile_type=1 and (a.accountStatus != 1 AND a.accountStatus != 8) AND a.deleted='false' ORDER BY ST.priority"
        Dim da As MySql.Data.MySqlClient.MySqlDataAdapter = New MySql.Data.MySqlClient.MySqlDataAdapter(SqlString, conn)
0
 
DimandjaCommented:
You have a typo.  Your concatenation should read (notice the comma between the apostrophies):


SU.fname +  ',  ' + SU.lname AS repName
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now