SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
New feature: Prompt for undefined variables

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
New feature: Prompt for undefined variables
Author Message
Olegon



Joined: 07 Sep 2009
Posts: 39
Country: Kazakhstan

Post New feature: Prompt for undefined variables Reply with quote
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:

Code:
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:

Code:
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.