DB Error: ERROR: syntax error at or near "AND" LINE 44: AND ((asf0.setting_value IS NULL OR asf0.setting_value... ^