Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all articles
Browse latest Browse all 2504

ROQL Sentence fetches wrong value

$
0
0

Topic by chidambaram CT

Flag1 & Flag2 is yes/no fields. Default value for flag2 is  'yes' before, now we changed to 'No value'.

I want fetch contact record with below mentioned 2 conditions

Condition 1 : flag1 is yes
Condition 2 : flag2 is no value (Default value) or flag2 is yes 

select ID,Contact.CustomFields.c.flag1,
          Contact.CustomFields.c.flag2 from Contact 
where Contact.CustomFields.c.flag1==1 AND (Contact.CustomFields.c.flag2 != 0 or Contact.CustomFields.c.flag2 == 'null') order by ID

In the above ROQL, even flag2 is equal to zero is also fetched. What is wrong in this ROQL sentence?


Viewing all articles
Browse latest Browse all 2504

Trending Articles