Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

How to write formulas based on text of columns in another table

$
0
0

We have thousands of formulas stored in a table 'Formulas'. How can we calculate values from a data table 'D1' based on the formulas in 'Formulas'

Table 'D1' has columns:

V1 V2 V3 V4 V5

with standard numeric data.

Table 'Formulas' has columns Date and F1 with value such as

Date  F1

2013 'v1=v2+v3'

2014 'v1=v2*v5'

The formulas in 'Formulas' are date-specific and also can change over time, so the solution must be dynamically generated during execution.

Thanks!



Viewing all articles
Browse latest Browse all 4729

Trending Articles