Override Default SQL Statements
m-Power applications allow you to have the ability to manually override the default SQL statement. Some customers wish to do this to be able to fully customize which data is extracted from the database. To do this, build your application as you normally would.
In the illustration provided below, we have selected the Report Template.

Then, instead of running your application, open the Application Properties from the Manage Applications screen.
Click the “SQL Statement” tab.

Look for the “sql_statment” parameter. Follow the on-screen help to specify your very own SQL statement.
Note: Any field you manually entered into your customized SQL statement must be included within the original application. Similarly, all fields listed in your Pre-Format field list must be included in your SQL override statement.
Note: To include record selection into your statement, use the following syntax within your sql statement:
${where runtime selections}
For instance, if my end user is adding record selection for a date, I might add the following SQL statement override:
SELECT T01."CUSNO" from HURCKES.DMCMP100 T01 ${where runtime selections} ORDER BY CUSNO
