What are the challenges you face when working across database platforms? Take the survey
Options

Bug - Variables Missing From Candidate List in Stored Proc

BrianFinkelBrianFinkel Posts: 33
edited January 15, 2008 2:32PM in SQL Prompt Previous Versions
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
Using Sql Prompt 3.7 with SQL Server 2000, Query Analyzer, and 2005 Mgmt Studio.

Comments

  • Options
    Bart ReadBart Read Posts: 997 Silver 1
    Hi Brian,


    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
    Bart Read
    Principal Consultant
    bartread.com Ltd
  • Options
    Got it. Problem solved. Thanks!
    Using Sql Prompt 3.7 with SQL Server 2000, Query Analyzer, and 2005 Mgmt Studio.
  • Options
    Bart ReadBart Read Posts: 997 Silver 1
    Great stuff! Glad to be able to help.
    Cheers,
    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
Sign In or Register to comment.