ODBC guide

Query work items using WIQL (#DirectSQL)


Same as the previous example but the query is sent to the server as-is using the #DirectSQL preprocessor, so you can write simpler SQL without wrapping the WIQL in a WITH parameter. Use this when you prefer to author the full WIQL statement directly. Behavior and result columns are the same.

For WIQL syntax see WIQL syntax.

#DirectSQL SELECT * FROM WorkItems WHERE [System.TeamProject]=''ProductTesting'' and [System.Id]=6455 ORDER BY [System.Id] DESC