Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a local ODBC driver for ServiceNow and I am trying to pull only the sc_req_item rows that have a matching [task] dv_parent:
let
ODBCQueryString = """SELECT * FROM sc_req_item#(lf)WHERE (number IN (""" & Text.Combine(Table.Column(Table.SelectRows(Tasks, each [dv_parent] <> null and [dv_parent] <> ""), "dv_parent"), """,""") & """)) AND (sys_created_on >= TIMESTAMPADD(SQL_TSI_YEAR, -5, NOW()))""",
Source = Odbc.Query("dsn=ServiceNow", ODBCQueryString)
in
Source
From the Tasks table I am selecting rows that dv_parent is not empty, converting to list and combining with '","'. For a short example, the returning string is:
"SELECT * FROM sc_req_item
WHERE (number IN ("RITM0247413","RITM0383048","RITM0349498")) AND (sys_created_on >= TIMESTAMPADD(SQL_TSI_YEAR, -5, NOW()))"
But I am getting the following error:
That list of RITM numbers may change and I need to dynamically create that list
User | Count |
---|---|
91 | |
73 | |
68 | |
63 | |
55 |
User | Count |
---|---|
96 | |
89 | |
73 | |
61 | |
58 |