What I am trying to do is take multiple rows of data from a column and insert it into a single cell. Here's what I have below:
+++HouseNumber+++++++CustomerType+++
+ 1 + Residential +
+ 2 + Commercial +
+ 2 + Residential +
+ 3 + Residential +
++++++++++++++++++++++++++++++++++++
And I need to get this to something that looks like this:
+++HouseNumber+++++++CustomerType+++++++++++++++
+ 1 + Residential +
+ 2 + Commercial Residential +
+ 3 + Residential +
++++++++++++++++++++++++++++++++++++++++++++++++
I realize that this is against the normalization thing; however, I simply need this data displayed this way so that I can view it more easily later on, the particular cell will never again be referenced for any individual item within it.
I tried to do this by creating two tables, one with a tempCustomerType, and one with a a customerType field orignally NULL and then update using the following:
UPDATE CustomerIdentifier
SET CustomerIdentifier.CustomerType = TempTable2.CustomerTypeTemp + CustomerIdentifier.CustomerType
FROM CustomerIdentifier
INNER JOIN TempTable2
ON CustomerIdentifier.SUB_ACCT_NO_OCI = TempTable2.SUB_ACCT_NO_OCI
However, after that each field was still null. So, any chance anyone here can help me? Thanks!
Also, if there is a way to do this without creating a second table, that would be great as well.