Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

MS SQL text file output - ascii code for hidden char

MS SQL text file output - ascii code for hidden char

3:28 pm on May 20, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 8, 2004
posts: 59
votes: 0

I wasn't sure where to post this, as it encompasses several areas, but as the filtering problem is in MS SQL, I thought I'd start here.
I'm using SSMS 2008 and am working with data from a varchar field in which there lies several hidden characters I'm trying to filter out for a VIEW.
Up until recently, my textareas on a particular webpage all were set to wrap 'default,' and thus wound up with some mysterious line breaks.
I've tried doing an ascii search in MS SQL, but all it found was a single space between the lines, rather than a break character. I tried filtering that particular ascii character out (as well as a few others - please see below), but the newline (or similar) break persists.
When inspected visually, the text file generated by textfile export in SSMS includes some larger 'whitespaces' that look like tabs, yet the tab ascii doesn't filter them out.
This newline isn't caused by hitting the <enter> key, but it is due to wrapping in a multi-line textarea.
I was wondering if this might be captured using some other means than ascii filtering?

Below is how I'm currently filtering
replace(replace(replace(replace(replace(cast(Overall_Notes AS nvarchar(4000)),char(13),''),char(10),''),char(39),''),(char(13)+char(10)),''),CHAR(32),'') AS Overall_Notes,

Thanks for any help or input.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members