Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Replace Hexadecimal characters in a record to Ascii Characters

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-30 : 08:27:01
Mohan writes "I have a table tab_Example, which has three columns; the cols are Category, Source, Query.


The records are as follows:
Category Source Query
Developer%2CTESTER%2CIDS%2CsupportDeveloper%2C+%20 country_code%20scn%20%22CN%22lang_code%20scn+support %22810%22FRB+LEVEL+3

Now I need to write a stored procedure that reads this table for each record and then replace those %2C and + characters with their respective ASCII characters.

For Example

Developer%2CICG%2CIDS%2Csupport should look something like
Developer, TESTER, support. (This is has to be inserted to a new table later on).

This means that %2c is been replaced by a comma.

Similarly I need to read each record traverse thru the record and then replace those %2d and + characters with the respective ascii.

Basically

%2d is 44 in decimal system and 44 is a comma in the ascii table."
   

- Advertisement -