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)
 Data type Formula

Author  Topic 

lane0618
Posting Yak Master

134 Posts

Posted - 2003-04-30 : 13:08:48
Is it possible to setup a datatype like:
...
aa7
aa8
aa9
ab0
ab1
ab2
...

so that if I add 1 to it in a sql statement it automatically takes the next logical string, so:
ab2 + 1 = ab3
or
ab9 + 1 = ac0

Thanks in Advance!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-04-30 : 13:13:39
I doubt you can do this in a data type. Your code will have to handle what the next value is, but that shouldn't be too hard considering you're just dealing with hexadecimal addition. You could do it in a user-defined function so that you don't have to keep writing out the formula.

Tara
Go to Top of Page
   

- Advertisement -