25 June 2015

Mysterious 101090 in T-SQL statement

Sometimes Transact-SQL (T-SQL) statement sent form AOS to SQL Server contains mysterious 101090 in a field list, even though select statement in X++ does not contain it. Also curious why?

Problem description
Find out what is 101090 in T-SQL statement.

Steps to reproduce
Run job like:
static void Test_101090_SQL(Args _args)
{
    InventBatch inventBatch;
    
    select generateonly description from inventBatch;

    info (inventBatch.getSQLStatement());
}

Hints
Try to select different system fields.