I want to create a standare SQL query that select a field from a database table when one of the other fields is true. I have tried the following with and without quotes. It does not recognize true or yes.
Select table.fieldname1 from table where tablefield.name = true
Select table.fieldname1 from table where tablefield.name = yes
Any help is appreciated.
Where are you executing this statement from?
Did you try using 4GL?
FOR EACH TableName NO-LOCK
WHERE TableName.FieldName1 = TRUE :
DISPLAY TableName.FieldName1.
END.
What error message are you getting or is it simply that no records are being returned?
If you are using SQL, use 0 or 1 instead of true or false.
I figured it out. I needed fieldName1 to be equal to 0.
Thank you.