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
 Transact-SQL (2000)
 Parsing a string

Author  Topic 

wotrac
Yak Posting Veteran

98 Posts

Posted - 2008-01-27 : 06:54:07
I want to pass the following string
(W-916)/700+2
into a function and replace the character W,
with a value and return a float.

I know how to use the replace function, so have managed to
replace the character 'W' with the value passed in to the function, but need some help on how to execute the calculation, so that it returns a value, rather than a replacement of the string.

Any help would be appreciated

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-01-27 : 07:11:13
use dynamic SQL exec() or sp_executesql


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-28 : 01:58:29
Are you storing expressions in a column?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -