I have table with two columns, both of them contains integer values, that looks like this:
DocumentUpId RelatedDocId
31608768 31624333
31608768 31624334
31618133 31618117
And I am trying to merge them into a single column like so:
DocumentUpId
31608768
31608768
31618133
31624333
31624334
31624334
I have tried this:
select rel_CTE.DocumentUpId + rel_CTE.DocumentDownId as 'RelatedDocId'
into #temprelations
from RelationsCTE rel_CTE
But it gives me concatenate of values (well sum in this case), so is it possible?