通过表字段和计算公式得到结果的问题
sgmao 2007-02-05 10:46:51 declare @str_sql varchar(2000)
declare @temp table
(
A1 int,
A2 int,
A3 int,
formula varchar(30)
)
insert into @temp values(1,2,3,'A1+A2+A3')
insert into @temp values(4,2,3,'A1+A2+A3')
insert into @temp values(1,4,3,'A1+A2+A3')
insert into @temp values(1,7,3,'A1+A2+A3')
insert into @temp values(1,2,6,'A1+A2+A3')
insert into @temp values(1,8,3,'A1+A2+A3')
select * from @temp
表@temp中formula是A1、A2、A3的计算公式
怎样返回计算公式的值
最好不要通过游标