If it's that important, then stop having Excel do the refresh. Create two identical reporting tables. For purposes of discussion, we'll call them TableA and TableB. Have one "TableActive" view and a "TableWork" view (call them what ever you like). To start with, the TableActive view would point at TableA and the "TableWork" view would point at TableB. The spreadsheet would read only from the TableActive view.
Have a stored proc in a job that outputs to the updateable TableWork view, which is currently pointing at TableB. When it's done with the update (or whatever), alter the TableWork view to point at TableA and the TableActive view to point at the freshly updated TableB. Next run, do the exact same thing except reverse what the views are pointing at.
If a deadlock occurs, don't execute the code that repoints the views. Excel will never know the difference.
is pronounced "ree-bar
" and is a "Modenism
" for R
First step towards the paradigm shift of writing Set Based code:
________Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
"If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
"Change is inevitable... change for the better is not."
When you put the right degree of spin on it, the number 3|8
is also a glyph that describes the nature of a DBAs job. 😉
How to post code problems