T-SQL to search for hexidecimal value 0x13?

  • We're having a problem with the data in a column that eventually becomes part of an OLAP cube and an SSRS Report Model. Somewhere in the underlying data there is a weird character or something that is messing up the XML passed to/by the Cube/Report Model. The cube processes and the report model deploys, but an error is raised when that particular column/dimension is used. The error I'm getting when using the Report Model in Report Builder 2.0 refers to an "illegal character" "hexidecimal value 0x13".

    I can't find anywhere on the internet that will tell me exactly what hexidecimal value 0x13 is. I need to figure out how to use T-SQL to search the column for that illegal character so it can be stripped out or replaced. And, more generally, it would be great to have some way to check the column for all illegal characters.

    Any suggestions from anyone?

  • I believe the character you might be looking for is ASCII character 19.

    Try running something like:

    SELECT * FROM YourTable

    WHERE YourColumn LIKE '%' + CHAR(19) + '%'

    And if I'm correct on that, to get rid of it, something like:

    UPDATE yourtable

    SET YourColumn = REPLACE(yourcolumn,CHAR(19),'|')

    WHERE YourColumn LIKE '%' + CHAR(19) + '%'

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • Ahhh. That absolutely did the trick. Thank you so much! And so simple, too. (Isn't it always?)

  • My pleasure, glad we could help.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

Viewing 4 posts - 1 through 4 (of 4 total)

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