Request code review for UDF: ContainsControlChar and CleanString

  • Hi All,

    I've done extensive testing, which I've documented in the attached file.  I know it's a pain to download the MS Word file, but I hope a few of you will - MS Word just seemed the easiest way to document my testing.

    In summary:
    I'm using a slightly modified version of Alan Burstein's code (http://www.sqlservercentral.com/scripts/T-SQL/117890/).  Thanks @Chris.  It's very similar to @jason's code.
    Is there a better approach to clean all character columns in the table than a series of CROSS APPLY's, one for each column?
    Is there a way to dynamically CONCAT all columns in a table, without having to specify each column?

    Thanks for help so far...

    Edit:  I tried to upload the SentryOne Query Plan sessions in a .zip file but the site just went into an "uploading file" loop (overnight).  Perhaps a site administrator can investigate the upload of .zip files? 
    So, I've attached the session files as .txt files.  Download and remove the .txt extension if you're interested.  You'll need the (free) SentryOne Plan Explorer software installed.

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply