Hi all,
I am having a bit of trouble with a stored procedure that I have written. The procedure takes data from my database and stores it in a temporary table. It then performs two updates on this temporary table and does a select on the temp table. If I run the same code in query analyzer, it works, however when I call the stored procedure (even from QA), it does not perform the updates. The reason I have used a temporary table is that each month there will be an extra column that needs extracting and so the table will grow (it will stop at some point but I currently don’t know when!)
I don’t really know much about stored procedures, so I was hoping that someone might be able to help. I can think of a few things that may work; putting the updates into a separate procedure and internally calling them from my procedure, changing the way I create the temp table; creating a permanent table that I add a column to each month. However I do not know if these things will work, or even if they are possible and do not really have time to try them all out.
If anyone can give me any advice or express their opinion on what the best alternative to try first would be, I would greatly appreciate it. If you would like a better explanation, please give me a shout.
I am having a bit of trouble with a stored procedure that I have written. The procedure takes data from my database and stores it in a temporary table. It then performs two updates on this temporary table and does a select on the temp table. If I run the same code in query analyzer, it works, however when I call the stored procedure (even from QA), it does not perform the updates. The reason I have used a temporary table is that each month there will be an extra column that needs extracting and so the table will grow (it will stop at some point but I currently don’t know when!)
I don’t really know much about stored procedures, so I was hoping that someone might be able to help. I can think of a few things that may work; putting the updates into a separate procedure and internally calling them from my procedure, changing the way I create the temp table; creating a permanent table that I add a column to each month. However I do not know if these things will work, or even if they are possible and do not really have time to try them all out.
If anyone can give me any advice or express their opinion on what the best alternative to try first would be, I would greatly appreciate it. If you would like a better explanation, please give me a shout.