I have a SQL-based question. when I run the select statement in my table it shows in one line but when I print it, it comes in multiple rows. because of this when I create SSRS report the data shows in multiple rows. eg: SQL select statement result: HYDROCARBON CONSTRUCTION CO % L H GUNN PO BOX 53495 HOUSTON TX 77052-3495
and when I filter by the WHERE clause I did not get any result.
eg: select emplpyer_name from employers where employer_name = 'HYDROCARBON CONSTRUCTION CO % L H GUNN PO BOX 53495 HOUSTON TX 77052-3495'
but when I print it, it gives results in four rows like below.
I have run the bolow code and got 4 line result. but I want it in one line when I print it:
declare @t varchar(1000); set @t=(SELECT Employer_name as a from EMPLOYERS where e_name like 'HYDROCARBON CO%'); print @t;
HYDROCARBON CONSTRUCTION CO % L H GUNN PO BOX 53495 HOUSTON TX 77052-3495
it is the address column and I am not able to get this result when I filter by the WHERE clause as well. it shows blank. I want all these multiple rows in one line when I print as well.It would be appreciated if someone helps me with this. and SSRS result I got like below. enter image description here
I have tried to concatinate it but still gave multiline result.