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)
 hex value in a stored proc./trigger

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-30 : 08:43:57
writes "Is there somewhow the possibility to convert an integer to a hex value in a procedur, trigger ? , similar to the hex() function in VB ? I want to create a trigger that gives each record a rowid, and part of this rowid is the hex. representation of an integer.

ex. 001-0000457F23 (dbnumber + hexval of an integer)

At this moment people who want to upload data have to use a vb routine, so i want to replace this by a trigger or procedure alike ...
any help is welcome...
Tks,
rov"

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-05-30 : 09:41:34
Casting an integer to a binary will give you the hex value; you might need to write a custom function to transform that to a displayable hex value, however.

setBasedIsTheTruepath
<O>
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2002-05-30 : 10:49:28
see
www.nigelrivett.com
Hex / char convertion

direct link
http://home.btclick.com/NIGELRIVETT/sp_ConvertBinaryChar.html

don't know if it will help.

==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -