I have a query on a test database that relies on a function installed on that database. I need to run that query against another server that doesn't have that function and on which I can not install that function.
Are there any elegant and/or practical solutions to this? The function is quite complicated with a number of parameters and so I had hoped there was a syntax that would allow me to label off a section of my query as a function and then call that code from the main body of the query.
I have tried to Google but unfortunately, as you might imagine, the words involved just lead to articles on how to create functions.
Edit: I am limited to SQL Server 2000 functionality for this.
My best answer at the moment came from myself. I stored the data I needed to process in a #temporary table and then used a while loop with the logic required updating rows back in the #temporary table. Quite a bit of reworking, but it worked and as a run-once operation I'm fine with that.