Bug - Variables Missing From Candidate List in Stored Proc
BrianFinkel
Posts: 33
I'm using Sql Prompt 3.6 in Query Analyzer with SQL 2000.
I have observed the following reproducible bug. Below is a sample stored procedure that will exhibit the problem.
CREATE PROC sptest @a nvarchar(1000)
AS
DECLARE @b int, @c bigint
DECLARE @d int, @e bigint
DECLARE @f int, @g bigint
DECLARE @h int, @i bigint
Paste the sproc into Query Analyzer. Go to the last blank line. Type 'SET @' and wait for Sql Prompt to make suggestions. Note the variables missing in the candidate list. Also note that while the final DECLARE clause exacerbates the problem, the same bug will exhibit with only the first three DECLAREs.
Brian
I have observed the following reproducible bug. Below is a sample stored procedure that will exhibit the problem.
CREATE PROC sptest @a nvarchar(1000)
AS
DECLARE @b int, @c bigint
DECLARE @d int, @e bigint
DECLARE @f int, @g bigint
DECLARE @h int, @i bigint
Paste the sproc into Query Analyzer. Go to the last blank line. Type 'SET @' and wait for Sql Prompt to make suggestions. Note the variables missing in the candidate list. Also note that while the final DECLARE clause exacerbates the problem, the same bug will exhibit with only the first three DECLAREs.
Brian
Using Sql Prompt 3.7 with SQL Server 2000, Query Analyzer, and 2005 Mgmt Studio.
Comments
That's not a bug. Please go to SQL Prompt > Options. Then go to Listed Candidates > Performance. Either (recommended) increase "maximum number of recently declared variables to display in the candidate list", or select "Search enter batch/GO block" (recommended only for faster machines, or scripts with plenty of batch markers).
Hope that helps.
Thanks,
Bart
Principal Consultant
bartread.com Ltd
Cheers,
Bart
Principal Consultant
bartread.com Ltd