How can we help you today? How can we help you today?

Bug - Variables Missing From Candidate List in Stored Proc

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
BrianFinkel
0

Comments

3 comments

  • Bart Read
    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
    0
  • BrianFinkel
    Got it. Problem solved. Thanks!
    BrianFinkel
    0
  • Bart Read
    Great stuff! Glad to be able to help.
    Cheers,
    Bart
    Bart Read
    0

Add comment

Please sign in to leave a comment.