homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

MS SQL text file output - ascii code for hidden char
MS SQL text file output - ascii code for hidden char

10+ Year Member

Msg#: 4315340 posted 3:28 pm on May 20, 2011 (gmt 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.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved