Grid Dinamic Sql Query, is it possible?

Hello,

It is possible to have a dinamic sql query on start up of grid?

For exemple:
Having a session variable as {Filter}.

and if {Filter} == “x” then sql query = “select * from table”
else
if {Filter} == “y” then sql query = “select * from table where y > 100”

Regards,
V?tor Pereira

Hello,

I found the solution for this problem

Solution:
if {Filter} == “x” then sc_select_where(add) = “where x = 1”;
else
if {Filter} == “y” then sc_select_where(add) = “where x = 2”;
else
if {Filter} == “y” then sc_select_where(add) = “where x = 0”;

else
//no where condition