I am trying to execute the following code:
static void ProjTableQuery(Args _args)
{
Query query;
QueryBuildDataSource qbds1;
QueryBuildDataSource qb
This hack is useful for understanding the SQL generated by a query:
query.literals(true);
info(query.datasourceNo(1).toString());
Add the line before the while
loop (maybe comment the loop out).
The output will be an almost legal SQL statement (some X++ still shines through though).
The corresponding hack for X++ gives the exact SQL statement:
ProjTable projTable;
select generateonly forceliterals from projTable
where ProjTable.Type == ProjType::FixedPrice;
info(projTable.getSQLStatement());
The output is fully legal SQL and can be copy/pasted to the Query Editor.