 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Olegon
Joined: 07 Sep 2009 Posts: 40
|
|
New feature: Prompt for undefined variables |
|
About this feature was message, but I can't find this post about.
Main idea was that when you select parts of code that uses variables and execute it by using SQL Assistant "Execute SQL Code". If selected part of code doesn't have declaration of variables it will be prompted for values. Then SQL Assistant will execute code with values instead of variables without affecting of main code.
Example:
 |
 |
select
*
from
dbo.Products p(nolock)
where
p.productid = @iProductID
|
Before executing SQL Assistant shows dialog where user inputs values for variables.
For our example it will be value 1 for @iProductID.
Then SQL Asistant executes query as:
 |
 |
select
*
from
dbo.Products p(nolock)
where
p.productid = 1 |
It will be very usefull feature! How about this? :)
|
|
Tue Oct 19, 2010 4:01 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Hi,
We have an enhancement already logged in the system for this bit of functionality, but the priority is set to low and target version is undefined yet. Form the investigation notes I see that there is no easy solution for implementing such feature. Variables are processed in the script by the database engine, adding a prompt on SQL Assistant side for values, wouldn't do any good. SQL Assistant would need to modify the script dynamically, adding missing variable declarations and assignments before executing the script and there are lots of potential side effects. This method also wouldn't work with multiple database system types.
|
|
Wed Oct 20, 2010 9:02 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|