Start a new topic

Allow adding multiple values in the dialog to enter data for parameter markers.

I have multiple queries stored in files to be executed by DbVisualizer for maintenance, support and debugging which contain "IN"-clauses and depending on the exact query and the support case, multiple different values need to be added into that clause.

While DbVisualizer supports recognizing a present "?" in such a clause, it seems to open a dialog where one can only input as many values as "?" are present in some query. Therefore I use one "?" as general marker in my queries only to make me aware that some data is needed at all, but in many cases I need to change the query to either add as many "?" as needed for my data or simply replace the one marker-"?" with the data to input directly.

Especially in cases like "IN", which are designed to work with almost as many data as one likes, it would be great to tell DbVisualizer somehow to open a dialog which supports adding additional input values. Pretty much like what is available for the data grids of tables already: One can add new rows, delete or copy existing ones etc.

So, a query like the following opens a dialog with one input value:

SELECT * FROM table WHERE id IN (?);

When I need 3 instead, the query needs to be changed to one of the following:

SELECT * FROM table WHERE id IN (?, ?, ?);

SELECT * FROM table WHERE id IN (1, 100, 1000);

OTOH, another placeholder like "???" with the meaning "input arbitrary many values" could simply be used like the following and opens the dialog like before with additionally enabled controls:

SELECT * FROM table WHERE id IN (???);


There is only limited support for the CASE clause, in that everything between CASE and END is treated as uninterpreted text. This means that, as opposed to plain object references in the select list or conditions, column names and other identifiers within a CASE clause are not affected by changes to the Query Builder property settings, such as Delimited Identifiers and Qualifiers.

1 Comment

Hi Thorsten,

I'm afraid this is not possible using Unnamed Parameter Markers (?). You will need to use Named Parameter Markers. 

An example 

SELECT * FROM `sakila`.`ACTOR` where ACTOR.actor_id IN (:IDLIST);

When you are prompted for a value for the IDLIST parameter you will need to set the Type to Literal. Then enter the values as desired. 

E.g. like 1,100, 1000.

For more details about parameter markers please see the Using Parameter Markers section of the User Guide.

Login or Signup to post a comment