Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

database view OR condition

Not applicable

Hello,

Can anyone tried to add OR condition in the where clause in database view?

(cat_u_category =inc_category && ( cat_u_subcategory =   '' OR   inc_subcategory = '' ) )

I have tried this but it is not working. when I removed the OR and replaced by && it is working.

Thank you

3 REPLIES 3

Patrick Schult2
Giga Guru

Try using the JS-style " || " operator instead of "OR".


Not applicable

I tried this cat_u_category =inc_category && cat_u_subcategory = '' and it is not getting the records tho.


Not applicable

Patrick I think the || will work. But trying this query cat_u_category =inc_category && cat_u_subcategory = '' this is not working I guess that null field values is not grabbing into the database view.,