web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / ODATA filter for SQL S...
Power Automate
Unanswered

ODATA filter for SQL Server boolean (BIT) columns

(0) ShareShare
ReportReport
Posted on by 250

The on-prem SQL Server has a table with a column of type BIT to store true/false values.  These values are stored as integers 0 or 1 in the DB engine.  When you use the Execute SQL Query V2 with an ODATA filter against this type of columns (fields), everyone and his dog's first instinct would be to write something like this (when selecting for true values):

 

 

boolean_field eq true or boolean_field eq 1

 

 

since this is the only sane thing that comes and should come to mind.  But Nooooo!  Leave it to Microsoft to find a way to force users into Gotham's lunatic asylum because insanity seems to be the preferred state of mind!  

Therefore our overlords in Redmond decided in their infinite wisdom that the following is what should come to mind naturally:

 

 

boolean_field ne 0, for ex to select all true values

 


This does indeed work as expected.  But why, oh why Microsoft!?   

 

Then again, perhaps it is just a bug... which seems to have been lurking since August 2020--can you believe this?!  2+ years and counting.  Honestly, this is worthy of
c48321cbe38db6b3a840849acf1dff31.jpg

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard