Toad World® Forums

SQL Statements with parameters


#1

If I remember right an old version of SQLNav used to raise a dialog when using a statements with parameters. Am I missing some setting or the actual version doesn’t seem to have the same behaviour?

For example:

select * from table1 where col1 = :value


#2

Make sure you have “scan binds/substitution” (“define on”) button pressed (it has a :& sign)

Message was edited by: Fsilva


#3

thanks man. I knew it is something I didn’t pressed :smiley:


#4

One more about this topic. If I have several statements with the same parameters, statements separated by ; , why do I have to hit enter all the time to pass the parameters to the next statement? After the execution of one statement, when the execution moves to the next one, the parameter window raises again. I repeat, the parameters are the same for all the statements. Maybe you should put a new button on the parameters window, a button called “Keep this params for entire file” or something. A change like this would be realy helpfull.


#5

Hi Catalin,

Thanks for the request. We will try to provide you an check box option to apply for the entire run/execution as per request in v6.5 release.

Thanks and regards,
Bruce


#6

BTW when asking for the bind values , I think it should select the value cell (for typing) and not the type


#7

Hi Catalin and Filipe,

Thanks to Roman for pointing out that you should be able to use the ‘&&’ which should provide you the ability to reuse the values.

I have attached some screen shot for your references.

You can manage your substitution values from right click SQL/Script Options.

Please let me know if ‘&&’ would meet your requirement.

Thanks and regards,
Bruce
codeeditor2.jpeg


#8

Hi Catalin and Filipe,

Thanks to Roman for pointing out that you should be able to use the ‘&&’ which should provide you the ability to reuse the values.

I have attached some screen shot for your references.

You can manage your substitution values from right click SQL/Script Options.

Please let me know if ‘&&’ would meet your requirement.

Thanks and regards,
Bruce
codeeditor.jpeg


#9

Hi Catalin and Filipe,

Thanks to Roman for pointing out that you should be able to use the ‘&&’ which should provide you the ability to reuse the values.

I have attached some screen shot for your references.

You can manage your substitution values from right click SQL/Script Options.

Please let me know if ‘&&’ would meet your requirement.

Thanks and regards,
Bruce
codeeditor3.jpeg


#10

Hi Catalin and Filipe,

Thanks to Roman for pointing out that you should be able to use the ‘&&’ which should provide you the ability to reuse the values.

I have attached some screen shot for your references.

You can manage your substitution values from right click SQL/Script Options.

Please let me know if ‘&&’ would meet your requirement.

Thanks and regards,
Bruce
codeeditor1.jpeg


#11

Actualy it does work just fine Bruce. Thanks.
But now… (you know i am a lazy guy)… i need buttons for Show Substitutions and Show Binding Vars. And also it should be a general setting that says I always want the Scan Defines/Substitutions ON when I open a new editor window.