SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

Kalaiselvan
Posting Yak Master

India
110 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.

TableA:
[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

TableB:
[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.


Regards,
Kalai

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

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

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.06 seconds. Powered By: Snitz Forums 2000