November 9, 2009 at 9:24 am
Hello,
I have an issue regarding the white squares showing up in my SQL table instead of it showing the CRLF. I was attempting to query this data out of this table but I cannot figure out how to deal wit the white squares. The table is a varchar table and changing it to text does not help. In Access the table reflects the CRLF by separating the data into 3 lines and I can query it from there but it is VERY slow. Any help would be great.
Thanks,
George
November 9, 2009 at 10:39 am
Are you using SQL Server Management Studio (SSMS) and displaying the query return in grid mode? If so switch the output to Text mode and the carriage return / line feed (white squares) will disappear and instead actually format your output. If you are not using SSMS please describe how / where the output is being displayed.
November 9, 2009 at 10:41 am
George the display of the chars depends on the presentation application; what program is viewing the data as squares
SSMS in gridview mode replaces vbCrLf(CHAR(13) + CHAR(10) )with a single space.
SSMS in textview mode shows your data as three lines.
other applications may decide to show them as squares.
NOTEPAD would show CHAR(13) + CHAR(10) normally but, but if you copy and paste THIS from SSMS text mode, you'd see squares:
select 'line 1' + CHAR(10) + CHAR(13) + 'line 2' + CHAR(10) + CHAR(13) + 'line 3'
select 'line 1' + CHAR(13) + CHAR(10) + 'line 2' + + CHAR(13) + CHAR(10) + 'line 3'
Lowell
November 9, 2009 at 10:48 am
Okay so they are really there and my code must be failing =). I actually went ahead and did it a different way and am getting the results needed albeit a bit slower. Thank you for replies.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply