How to put multiple printed rows in one line in sql?

Hi,
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

but when I print it, it gives results in four rows like below. because of this, I am not getting one line result in SSRS as well.

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.

The data has embedded control characters - either CR or LF or CRLF. If you want that data to display in a single row in SSRS then you have to replace the embedded characters with a space (or some other character). For example:

SELECT ssrs_address = REPLACE(REPLACE(address, char(10), ' '), char(13), ' ')
2 Likes

Thank you. problem is solved.

Thank you. for the answer. worked.