Start a conversation

Using sc_select_order macro

It is possible to change on the fly the ORDER BY clause.
This requires that the original SQL statement already have an ORDER BY clause because we will replace it.

Example 1:

SQL statement: select id, name from customers order by birth

To change the order by to name, we have:

sc_select_order ( "birth") = "name";


Example 2:

SQL statement: select id, name, credit, birth from customers order by id, name, birth

To change the order by field birth to credit, we have:

sc_select_order ( "birth") = "credit";


Note: This command should be in the context of "process before the select."

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Caio Guerra (Migrated deleted Agent)

  2. Posted
  3. Updated

Comments