Replacing huge IF statement with SQL code

Printable View