Question

Running SQLExecutor with blank Parameters

  • 28 May 2018
  • 1 reply
  • 0 views

Hi,

I have an SQLExecutor that uses some Public Parameters in the WHERE condition. If the user leaves the Parameter blank then the query look for blank "" fields. How can I dynamically control what goes into the WHERE condition, so when the parameter is blank we exclude that condition?

Thanks


1 reply

Userlevel 4

The easiest solution may be to test for a blank where-statement and replace it with something like

WHERE 1=1

Reply