This is what I did
Imported new data
4099 rows
They import without a rowid assigned
I performed the following:
declare @currrow char (10)
declare @counter int
declare @numrows int
declare @numrows2 char (19)
declare x cursor for select count (*) from AP_Dept1113
open x
fetch x into @numrows
close
select @numrows2 = convert ( char(19), @numrows )
declare stamper cursor for select o_rowid from AP_Dept1113 for update of o_rowid
select @counter = 1
open stamper
while (@numrows > o)
begin
fetch stamper into @currrow
print @Currrow
update AP_Dept1113 set o_rowid = convert ( char(19), @ counter ) where current of stamper
select @counter = @counter + 1
select @numrows = @numrows - 1
end
This ran for quit awhile, I stopped it; then ran:
select count(*) from AP_Dept1113
got: 63562
select * from o_rowid_ident
got:
rowid rowwidd
76309 150000
I did a query
select o_rowid, number_of_dups = count (*)
from AP_Dept1113
group by o_rowid
having count (*) >1
got: 1613 duplicate rows?????
I still need help finding a better way to add rowid's to existing data. But more so, need assistance fixing my duplicate rows. Can you or anyone help?
Thank you.