Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hi, I want to pull data from a table in a database with this statement.
It works, but returns only the records with the first datetime in the 'IN' clause (08/27/2024 03:34:05).
For information: the list with datetimes is generated dynamically with data from another table.
I am sure that there are records in the table that should be returned.
So why it stucks to the first datetime in the list and ignores the others?
Select DateTime, Tagname, Value FROM table WHERE TagName='P124' OR Tagname='P132' AND DateTime IN ('08/27/2024 03:34:05', '08/27/2024 02:07:46', '08/27/2024 03:30:05')
Solved! Go to Solution.
Use ISO-8601 formatting, always.
You need to protect the OR part from the AND part.
Select DateTime, Tagname, Value FROM table WHERE TagName IN ('P124' ,'P132') AND DateTime IN ('08/27/2024 03:34:05', '08/27/2024 02:07:46', '08/27/2024 03:30:05')
Use ISO-8601 formatting, always.
You need to protect the OR part from the AND part.
Select DateTime, Tagname, Value FROM table WHERE TagName IN ('P124' ,'P132') AND DateTime IN ('08/27/2024 03:34:05', '08/27/2024 02:07:46', '08/27/2024 03:30:05')
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 7 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 12 | |
| 11 | |
| 11 | |
| 7 | |
| 6 |