- Home
- Anonymous
- Sign in
- Create
- Ask a question
- Spaces
- Site Issues (NOT FOR DATABASE QUESTIONS)
- Explore
- Topics
- Questions
- Users
- Badges

Hello, I want to understand how can I use the formula stored in text/varchar field ? Let me put an example : There is a tables say Table_A Table_a stores Codes, Description, Percentage and Base code. Tax code Description Percentage Base Code 100 Amount - - 101 Tax A 10% - 102 Tax B 0.03 % 101 While calculating the tax currently I put the tax calculation hard code logic in store proc i.e `((fltAmount*fltTaxA %)*fltTaxB %)` What I wantto achieve is I will store the formula `((fltAmount*fltTaxA %)*fltTaxB %)` into the table column having varchar data type. At the time of execution I will simply get the formula store it to a variable and evaluate the formula stored in string variable so it produces the required result. Some what similar behaviour can be achieved by microsoft scripting object. Is it possible to do it in sql ? If yes How? I hope I am clear in putting my idea Thanks and best regards, Milind Shevade

stored-proceduresdynamic-sql
Comment

No one has followed this question yet.

Copyright 2019 Redgate Software.
Privacy Policy