Data selection

There is a tool, that creates a GUI out of a SQL-file having some additional commands in. Read here how this works

The ListSelectionPanel lets the user select elements from a list and adds them to the query. The content of the list is generated out of a SQL-query by itself.

 

Format:

 

#execute(Unique-Tab-Title;Type(IN|SIMPLE);(Table.attribute IN|Table.attribute);SQL-Query) where IN generates an IN-SQL-Statement (attribute IN ('A','B'...) )

and simply spaces in between two selected elements

 

In this case our statement looks like this:

#execute(City;IN;garage.city in;select distinct city from garage)

 

Where the elements are as follows:

  1. unique tab-title
  2. the mode to use (IN lets the interpreter create a SQL-statement with IN)
  3. the table-column (garage.city IN creates the correct sql-statement, so do not forget the keyword IN)
  4. the SQL-statement used, to create the left part of the window

 

this selection will create such a SQL-fragment:

 

garage.city in ('Zuerich' , 'Vienna' , 'Dortmund')