Not really AFAIK
But you can
- have a normal identity field
- have a computed column that generates the custom ID
try the following code
create table #dummy_table ( id int identity, char_seq as cast(char(64 + id % 27) as char(1)), mix_seq as cast(id as varchar(10)) + '.1R', anotherfield varchar(100))
insert #dummy_table (anotherfield) values ('row 1')
insert #dummy_table (anotherfield) values ('row 2')
insert #dummy_table (anotherfield) values ('row 3')
insert #dummy_table (anotherfield) values ('row 4')
insert #dummy_table (anotherfield) values ('row 5')
select * from #dummy_table
drop table #dummy_table
HTH
Hilaire
Main Topics
Browse All Topics





by: svidPosted on 2004-06-11 at 08:50:07ID: 11289794
Autonumber (or identity) is a numeric data type. I don't think you can have SQL Server automatically do this for you.
One option is to get the previous value and insert with the next value.