SQL Server Formula

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tabita
    New Member
    • Jan 2009
    • 1

    SQL Server Formula

    Hi,

    I have a database with some tables in Sql Server 2005. I want to make a stored procedure/T-sql/... or smth like that, to set a formula of a certain table. For example, I have the table "Orders", with fields like: "OrderID", "Name", "Price", "Quantity", "Height". Then I select from a web form which operands to be included in the formula and I select also one operator.

    For example, for the above table, I select Price and Quantity operands and the "+" operator, then I want my query to return Price + Quantity; but I want to can use that query also for other operators and other operands (and not only 2 operands, I want to can use it with 2 or more operands).

    I appreciate your replies.
    Thank You,
    Tabita
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Sounds like an assignment.

    What do you have so far?

    -- CK

    Comment

    Working...