Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

SSRS 2008 r2 concatenate Expand / Collapse
Posted Sunday, November 3, 2013 8:55 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 10:39 AM
Points: 564, Visits: 700
In an sql server 2008 r2 database, I have one column that I need to separate the values. I then need to concatenate the values together in one row from t-sql that looks like the following:

11-12 Midwest Plumbers 099.

The values in the column look like the following

099 11-12 Midwest Plumbers.

I need to split the data to look like

1. 099 is the Customer Number.

2. 11-12 is the year the customer data was valid.

3. Midwest Plumbers is the name of the company.


1. The delimiter between the 3 fields is " " (one space).

2. The company name can contain lots of spaces.

3. There are 3 fields that need to be separated out which are:

a. Customer Number,

b. Effective Years,

c. Customer Name.

For the one row that will be displayed there needs to be 4 spaces between each value.

Thus can can you show me how to split up the in this column and then display the values in the order the customer wants to see?

Post #1510896
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse