How to use SQL to parse several numbers out of a single field with tokens

What I want to do is simple to describe I have strings:

string1 = '30-3/8"' String2 = '2-1/16' String3 = '9" and 6-1/2"' String4 = '3-3/4 x 3-1/2"' 

What I need to do with SQL is convert the string to a decimal equivalent in inches. Need result of Number left of “–” + (left of “/”/ right of “/”). Thought this would be easier using:

SUBSTR([field], int, int) and CHARINDEX(string, [field])  

but I haven't figured it out and quite stuck. Any help much appreciated of course.


Category: sql Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.173 (s). 12 q(s)