Hello there, I'm using the following in active server pages that calculate prices on lumber when orders are created. The user adds an item and quantity and the calculation is made. I'm not proficient with stored procedures, but would like to know if it would make more sense to write a stored procedure to do the same thing. If so, how would I apply it? Many thanks for your thoughts.
Code:
strSql="SELECT Price,calcMethod FROM myTable WHERE itemNumber='" selectedItem & "'"
.......
price = rs("Price")
calcMethod = rs("calcMethod")
SELECT CASE calcMethod
CASE "SF"
'perform SF calculation on price variable
CASE "MBF"
'perform MBF calculation on price variable
CASE "CSF"
'perform CSF calculation on price variable
END SELECT