ODBC guide

Query work items by WIQL in a project


Runs a WIQL query in a specific project by passing both the project name and the query in the WITH clause. Use this when the connection default is different from the project you want to query, or when you need to target one project explicitly. The query can filter by ID, state, type, or any other WIQL criteria.

SELECT * FROM WorkItems WITH (Project='PosProject', Query='SELECT * FROM WorkItems WHERE [System.Id] = 2819')