Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Formula Calc From Another Formula
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

112 Posts

Posted - 12/05/2013 :  07:01:26  Show Profile  Reply with Quote
Got a table with some formula and its Mapped with some other Table. Please help me how to calc the Formula in SQL.

[ID] [Varname] [IsFormula] [Formula]
101 Var1 0 101_Vol
102 VAR2 1 102_Vol+101_Vol
103 Var3 1 103_Peso/102_Vol
104 Var4 0 104_Peso

[VARID] [ModelName] [IsFormula] [Formula] [MAPID]
1 Volume 1 VAR2+VAR3 102,103
2 Price 0 Var4 104
3 Value 0 Var1 101

How to Calc the formula Using the Above Table. Because Formula is taken from Another Formula.


Very Important crosS Applying yaK Herder

52326 Posts

Posted - 12/05/2013 :  13:22:08  Show Profile  Reply with Quote
So what should be output from above?

SQL Server MVP
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000