Reputation: 11
EDIT: The concat was supposed to combine the two on the same line, or so I thought. But it had just took out the nulls from the columns so that there were only two -> submissions and building_idquant. When before there was submission_id, building_id, and integer.
Upvotes: 0
Views: 474
Reputation: 31991
its tough to get your expectation from image but i thought after seeing your image you need below somethin
select submission_id,building_idquant ,
concat(CONVERT(varchar(50), submission_id),building_idquant ) as id_quant from
(
select distinct submission_id,building_idquant from tablename
) t
Upvotes: 1