Ok, we have a small collection of databases that are similar. Many tables need unique id values, but these id values must come from a pool in one central database. So no IDENTITY columns can be used. I have created a Sequence_Tbl in my central database, but now when I want to copy data from one database to another, where I used to use:
insert into db2.dbo.table
(column list except the identity col)
select column list except the identity col from db2.dbo.table
Now i can't do that, because we no longer use identity cols.
I've tried using a UDF, but you can't update a table in a UDF. So I tried creating a stored procedure, but only an extended stored procedure is allowed to be called from within a function. I've hit a conundrum here. Any thoughts? I could, of course, go the extended stored proc route, but I'd rather not.
Thanks
insert into db2.dbo.table
(column list except the identity col)
select column list except the identity col from db2.dbo.table
Now i can't do that, because we no longer use identity cols.
I've tried using a UDF, but you can't update a table in a UDF. So I tried creating a stored procedure, but only an extended stored procedure is allowed to be called from within a function. I've hit a conundrum here. Any thoughts? I could, of course, go the extended stored proc route, but I'd rather not.
Thanks