Encapsulte as SP - not converting variable to parameters

Refactors and formats SQL code.

Encapsulte as SP - not converting variable to parameters

Postby RichBev61 » Wed Jul 01, 2009 5:49 pm

Here is the sproc code that is generated in the preview window:

Code: Select all
CREATE PROCEDURE dbo.EncapsulatedProcedure AS
SET @actno = '1234'
FROM    dbo.tblAccountOHD
WHERE   AccountNo = @actno

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.
Posts: 4
Joined: Wed Jan 21, 2009 5:02 pm

Postby Giggles220 » Thu Jul 02, 2009 12:52 pm

I've had the same problem and since I haven't tried to use it that often I always assumed I was doing something wrong. It would be nice to know why it doesn't put the parameter in or what we have to do so that it will
Posts: 114
Joined: Thu Dec 07, 2006 8:06 pm
Location: Albany, NY

Postby Anu Deshpande » Thu Jul 02, 2009 1:50 pm

Thnaks for your post and apologise that you have encountered this issue with SQL Refactor.

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.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
Posts: 838
Joined: Mon Apr 20, 2009 2:53 pm
Location: Cambridge

Return to SQL Refactor Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests