Encapsulte as SP - not converting variable to parameters
RichBev61
Posts: 6
Here is the sproc code that is generated in the preview window:
As you can see, a variable is declared, set and used, but stays a local variable. I've tried this on a number of different queries and the locals NEVER become params. What gives?
BTW, I've re-started SSMS 2005 and the results are the same.
CREATE PROCEDURE dbo.EncapsulatedProcedure AS BEGIN DECLARE @actno VARCHAR(19) SET @actno = '1234' SELECT * FROM dbo.tblAccountOHD WHERE AccountNo = @actno END
As you can see, a variable is declared, set and used, but stays a local variable. I've tried this on a number of different queries and the locals NEVER become params. What gives?
BTW, I've re-started SSMS 2005 and the results are the same.
Comments
I was able to replicate this issue at our end.
I have raised this bug in our internal tracking system so that development team can look into it and incorporate in future release. Bug tracking number for that issue is SR-849.
Kindly let me know if you have any other issues regarding SQL refactor, I'll like to help.
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com