select name,Beds__c,Square_Footage__c,Initial_List_Price__c,Status__c
from Condo__c where name!=null
and Status__c = \'Unsold\'
OR Status__c = \'Available\'';
2 Answers
USE IN
for multiple values IN(option1, option2, option3, ...etc)
Query will be
select name,Beds__c,Square_Footage__c,Initial_List_Price__c,Status__c
from Condo__c where name!=null
and Status__c IN ('Unsold', 'Available')
String strQuery ='select name,Beds__c,Square_Footage__c,Initial_List_Price__c,Status__c '+
' from Condo__c '+
' where name!=null '+
' and Status__c IN (\'Unsold\', \'Available\')'
Based off some of the syntax you had, it looks like you using this in apex. If that's the case, there needs to be some other syntax added to what's below to get it to work. If you are using this in the data loader or anything else looking directly for a query, this will work.
Select name,Beds__c,Square_Footage__c,Initial_List_Price__c,Status__c
from Condo__c where name!=null
and Status__c IN ('Unsold', 'Available')