Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase «««1234

Converting Hexadecimal String Values to Alpha (ASCII) Strings Expand / Collapse
Posted Friday, April 25, 2008 6:20 AM



Group: General Forum Members
Last Login: Today @ 11:17 AM
Points: 42,046, Visits: 39,424
I agree that there're a lot of things, like this conversion, that should be done in the GUI instead of SQL Server. Displaying commas in dollar amounts and formatting dates and the like qualify, as well. That does two very good things... it distributes the "extra" clock cycles to the GUI thereby taking some of the load off of the server and it allows the GUI to format according to regional settings...

... if you have a GUI.

If all you have is batch code, then finding a good high speed answer in T-SQL is worth it. And, no, CLR's aren't the Nirvana of code that everyone is looking for, either. Source code external to the Server must be maintained and they ususally can't beat a properly written solution in T-SQL. Matt Miller, me, and a couple of other folks did some pretty heavy testing against CLR's and the only one that came out better was a RegEx CLR that did replacements (I can't put my hands on the URLs... I'd have to do a search). Of course, just because someone says something like this doesn't mean you shouldn't also do some tests of your own for you own particular situation.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

Helpful Links:
How to post code problems
How to post performance problems
Post #490575
Posted Sunday, April 27, 2008 2:12 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, February 26, 2015 12:25 PM
Points: 32, Visits: 48
Agree that presentation software is great for presenting end results data, but in some instances you want to have pre-filtered the results from your database via the underlying SQL. This was why I needed the conversion in the SQL, as I had to filter my table to get just a few rows out of a much larger table, and just present these few rows by the presentation software. I believe doing the filtering in the SQL on the server to be a lot quicker than passing the whole table back to the presentation software to filter it there. Thanks for the feedback.

Post #491148
« Prev Topic | Next Topic »

Add to briefcase «««1234

Permissions Expand / Collapse