Adapt sql_col_condition() for new lookup tables