cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 12

DB query with a checkbox

Jump to solution

I'm trying to run a query against the database where one of the fields displays as a check/tick box.

How on earth does one filter against that?

A basic search of:

 

SELECT NodeID, Client, Node_In_BAU FROM [dbo].[NodesCustomProperties]
Where ClientPrefix like '%xxx%'

 

 returns:

stuartd_0-1602674157311.png

But for the life of me I can't figure out how to do an "and Node_In_BAU equals Tick or No-Tick"

Labels (1)
0 Kudos
1 Solution
Level 12

The checkboxes are booleans. So field=1 should work or somthing like that.

View solution in original post

5 Replies
Level 12

The checkboxes are booleans. So field=1 should work or somthing like that.

View solution in original post

Thank you.

I shall go play and see what happens 🙂
0 Kudos

Got it, but never would have without your assist @Seashore 

What I need is:

    >> WHERE Node_In_BAU = 0   (or 1 depending on need).

Muchas gracias or as we Welsh would say - diolch.

0 Kudos

Varsågod, as we Swedes would say 😉

Level 12
For the record, I can do an 'Order By' but that isn't what I want 🙂
0 Kudos