How can I calculate prices? Here's what I have: a table named tblProducts with fields including COST, DISCOUNT, and DISCOUNT TYPE. The problem is, some products are discounted by a dollar amount and others by a percent, like this:<BR>COST DISCOUNT DISCOUNT_TYPE<BR>300 50 %<BR>250 30 $<BR>300 50 $<BR><BR>I need to display the calculated PRICES on a web page. But the math equation changes if the DISCOUNT TYPE is $ or %. How do I construct the SQL to create a VIEW where I have "IFs". Like, IF DISCOUNT_TYPE=$ THEN PRICE = COST-DISCOUNT ELSE IF DISCOUNT_TYPE=% THEN PRICE = (COST-(COST*DISCOUNT/100))<BR><BR>I need to "link" the prices to the products (in tblProducts) and I need the web page to be able to SORT by PRICE. I have done this by storing the PRICES in the table itself, but I know that's poor design. Do I create a View? Stored Procedure?<BR><BR>Other problem is when I "globally" update the DISCOUNT (all products starting with "a" set the DISCOUNT to 35%). The change needs to be reflected in the PRICES and when the prices are stored in the table, they don't change all by themselves.