Problem with declared variables
wd
Posts: 25
Hi,
I recently installed SQLPrompt 3.5 RC and have run into a strange issue.
I declared a few variables for a stored procedure and went on with my code and wanted to start setting these variables. After typing the set command I waited for the variables to all be displayed by SQLPrompt, but only a couple of them were shown. I tried flushing the cache to see if that would help but to no avail.
Here is the code that I had used:
@Command, @FTPFile, @LogName, @Namechange, @Savedir and @Scriptfolder were all listed by SQLPrompt; the rest weren't.
I had added @Jobid to the top of the list after all other items were there, could this be the reason for the confusion? What could I do to make SQLPrompt see all of the other variables? Do I have to add my variables all at the end of the list instead of inserting them in an existing list?
Many thanks
wd
I recently installed SQLPrompt 3.5 RC and have run into a strange issue.
I declared a few variables for a stored procedure and went on with my code and wanted to start setting these variables. After typing the set command I waited for the variables to all be displayed by SQLPrompt, but only a couple of them were shown. I tried flushing the cache to see if that would help but to no avail.
Here is the code that I had used:
DECLARE @JobId INT, @Jobname NVARCHAR(50), @Jobdir NVARCHAR(100), @LocalDir NVARCHAR(100), @LocalFile NVARCHAR(100), @FTPServer NVARCHAR(50), @FTPFile NVARCHAR(50), @Namechange NVARCHAR(50), @SaveDir NVARCHAR(100), @Command NVARCHAR(100), @ScriptFolder NVARCHAR(100), @LogName NVARCHAR(30) SET @
@Command, @FTPFile, @LogName, @Namechange, @Savedir and @Scriptfolder were all listed by SQLPrompt; the rest weren't.
I had added @Jobid to the top of the list after all other items were there, could this be the reason for the confusion? What could I do to make SQLPrompt see all of the other variables? Do I have to add my variables all at the end of the list instead of inserting them in an existing list?
Many thanks
wd
Comments
From the SQL Prompt menu click Options > Listed Candidates > Variables and Parameters. Now increase the value of "Maximum number of recently declared variables to display in the candidate list".
If you're working with small scripts, or your scripts have regular GO markers (say every 50 lines or so) you could also just switch to "Search entire batch/GO block" on the same options screen.
Thanks,
Bart
Principal Consultant
bartread.com Ltd
Super..... problem solved.... damn you're quick
Thanks,
Bart
Principal Consultant
bartread.com Ltd
Thanks,
Bart
Principal Consultant
bartread.com Ltd