Connecting Tech Pros Worldwide Forums | Help | Site Map

SQL Server Formula

Newbie
 
Join Date: Jan 2009
Posts: 1
#1: Jan 16 '09
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's Avatar
Expert
 
Join Date: Jun 2007
Posts: 1,925
#2: Jan 16 '09

re: SQL Server Formula


Sounds like an assignment.

What do you have so far?

-- CK
Reply