February 15, 2010 at 11:07 pm
Hi.I need insert new record between records and update Id.
I writing an accounting system.In this system sometimes user need insert new voucher between vouchers because vouchers must be sort with date and voucher number. User cannot insert into new number and sort with order by.because numbers is not sort.
i write this query but in 200000 record very slow
Update Fs
Set fs.Id=Fs.id+1
From Tbl_Vouchers Fs
Where Fs.id>50
I cannot use float numbering in voucher number. my voucher number must be integer.
Thanks
February 24, 2010 at 2:53 am
Is the voucher number unique per row?
I don't understand why you need to update the Id? If the Id is a true primary key, it should not be updated.
February 24, 2010 at 2:55 am
Ignore this. I have just seen the other post with all the answers!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply