ODBC guide

Read incident tasks


Retrieve all tasks associated with a specific incident. Incident tasks are stored in the incident_task table and linked using the parent incident reference.

You can use static date or function as above. This function expression can be in the form of [function_name][+/-][interval][interval][+/-][interval]... For example to get Last date of previous month you can do "monthend-1d". To get yesterday's date you can just type "yesterday". Valid date function names for this expression are [ now | today | yesterday | weekstart | weekend | monthstart | monthend | yearstart | yearend ]. Valid interval names are [ms (for milliseconds) | s OR sec | min | h OR hour | y OR year | d OR day |m OR month | y OR year]

-- Get all tasks for a specific incident
SELECT *
FROM get_table_rows
WITH(
    TableName='incident_task',
    Query='incident.number=INC0012345'
)