Concatenation of Columns with string seperater?

  • Thread starter Thread starter What-a-Tool
  • Start date Start date
W

What-a-Tool

Have 2 columns in a DataTable:
Home Team
Away Team
I want to concatenate them into 1 column (New Data Column) with a "vs."
between them.
I can combine the 2 rows with this format:
dcGame.Expression = "Home + ' ' + Guest"

but I can't get the ".vs" in there no matter what I try.

Could someone please tip me off to the correct formating?

Thanks-Sean
 
What I finally got to work was:
dcGame.Expression = "[Home] + ' vs. ' + [Guest]"

"'Home' + ' vs. ' + 'Guest'" gave me a data column filled with "Home vs.
Guest"

Thanks - Sean
 
Back
Top