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

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Evaluate expressions contained in a String

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-07 : 09:04:10
Shoba writes "Consider the following situation:

Create Table #temp1 (f1 varchar(100))
Create Table #temp2 (f1 float)

Declare @var1 varchar(100)
Set @var1 = '100+50'
insert into #temp1 values (@var1)

Now, how do I write a Sql to insert the calculated value of f1 from #temp1 into #temp2? That is, after doing this insertion, if I give a Select * From #temp2, I should get the result as 150."
   

- Advertisement -