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.
Author |
Topic |
HenryFulmer
Posting Yak Master
110 Posts |
Posted - 2013-06-26 : 03:52:34
|
I have a query result that gives me the follwoing value:296,492,50This gets return as a string.I need to be able to extract the lowest numerical value in this string.How do I go about it?Thanks for your help. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
HenryFulmer
Posting Yak Master
110 Posts |
Posted - 2013-06-26 : 04:32:05
|
Thanks - when I use this it seems to sort by the value of the first number only.SELECT MIN(Val)FROM dbo.ParseValues('296,482,50',',')freturns 296 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-06-26 : 04:41:11
|
i got issue. the return type was varcharyou could use this small modificationSELECT MIN(Val*1)FROM dbo.ParseValues('296,482,50',',')f ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2013-06-26 : 12:44:42
|
Another option would be to modify the or create a new parse function that returns integer values. |
|
|
|
|
|