computed columns (MS SQL) - ops...


2003-11-12 03:11:57 PM
delphi277
just simple question
is it possible to put IF statement into formula (and how)
(formula is on columns property page)
here is the structure of the table
1.Key
2.Name
3.Price
4.Quantity
5.Discount
6.......
And I want this
-- regularly, statement should look like this(IF EXISTS(SELECT Discount FROM
TableName))
IF EXISTS(Discount)
ROUND(Price*Quantity, 2)-((ROUND(Price*Quantity,2)*Discount)/100)
ELSE
ROUND(Price*Quantity, 2)