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 2008 Forums
 Transact-SQL (2008)
 Extract money information

Author  Topic 

andy_iimc
Starting Member

5 Posts

Posted - 2012-10-30 : 04:06:01
I have a Money field in SQL Server 2008 R2 called GiftAmount in table Test. The data is as follows:

GiftAmount
R/s 45
Rs. 123.5
R.s. 100
24
50
RS 90

Is it possible to extract (Select) only the amount information from the field through an SQL query - or do I need to write a store procedure for it - read the entire string, pick up the string remaining from the first integer encountered?

Desired result
GiftAmount
45
123.5
100
24
50
90

Thanks in advance!

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-10-30 : 04:13:20
use the function here http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=79083&SearchTerms=fnFilterString


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

Go to Top of Page
   

- Advertisement -