i have table of amounts. amounts classified in 3 ways: semi-monthly, monthly, , quarterly.
- if amount > 10000 = semi-monthly
- if amount > 5000 = monthly
- if amount <= 5000 = quarterly
the data in amounts table must match above.
if there discrepancies need have spit out @ me.
how go writing code?
well, check:
select t.* t ((amount > 10000 , classification <> 'semi-monthly') or (amount <= 10000 , amount > 5000 , classification <> 'monthly') or (amount <= 5000 , classification <> 'quarterly') );
this return discrepancies.