Question: I have a html form where people can enter number of purchase item. Default value of that text field is 1. 

```
<input type="text" size="5" value="1" id="position" class="amntstyle" name="position"> 

```

I want another text input field for price where the value would be 15 times of position automatically.

For example if someone enter 3 in position field, the price input field will get value 45 automatically. Like this 

```
<input type="text" size="5" value="45" id="price" class="amntstyle" name="price"> 

```

Is it possible?

Thanks a lot for your help.

Answer: 
You can try this. I hope this can assist you. It takes expression from t1 and put the result in t2. You won't want to make t1 the actual table as it deletes from the table, so you can copy the actual table value to a temp table

```
declare @t as table(val varchar(20))
declare @t2 as table(val varchar(20))
insert into @t values
('1+3'),
('2*3'),
('9+3*2')

declare @exp varchar(20)
while(exists(select 1 from @t))
begin
    select top(1) @exp = val from @t

    insert into @t2
    exec ('select '+@exp)  

    delete top (1) from @t
end

select * from @t2

```

Result

```
val
------
4
6
15

```

You can check these links [Similar question here](http://www.sqlservercentral.com/Forums/Topic1171708-338-1.aspx) and [Convert string with expression to decimal](https://stackoverflow.com/questions/10277884/convert-string-with-expression-to-decimal/10278603#10278603)
Follow the link -
[Convert string with expression to decimal](https://stackoverflow.com/questions/10277884/convert-string-with-expression-to-decimal/10278603#10278603)

After you create function DBO.EVAL , just Run :-

```
select dbo.eval(column_name) from table_name;

```