Is it somehow possible to retrieve a string and then convert it into a mathematical expression? for example i have this string '14200 * 5' and then i want to convert this into a mathematical formula so that i could get the result of it which is 71000.. .. i thought eval() function was available on MSSQL , is there such a function on MSSQL?

Thanks....

Hi,

You have to use the EXEC function but after some conc. ex: EXEC('select ' + '14200 * 5') you may need to use stored procedures.

Member Avatar for fatihpiristine

stored procedures is the solution here

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.