Link to home
Start Free TrialLog in
Avatar of steven
stevenFlag for United States of America

asked on

Rip data from string

Can anyone help me to rip data from a string?  I have not been able to get it correct as it is not always the same one example  "4 X "5.02 X "5.32    another may be 2.5" X .75"  X 3" .
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

What output you need from your input.
Avatar of Vitor Montalvão
Are those mathematics expressions?
Avatar of steven

ASKER

Sorry not mathematics, just a measurement. I need the numbers only
"4 X "5.02 X "5.32  -------> 45.025.32 ??
Avatar of steven

ASKER

No just              4  
                          5.02
                          5.32
3 rows ?
Avatar of steven

ASKER

One row would fine with each value
Do you have a table where these values are stored?
Avatar of steven

ASKER

Yes columns od, id, length
ASKER CERTIFIED SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of steven

ASKER

Id gives me the below error,

Msg 537, Level 16, State 3, Line 2
Invalid length parameter passed to the LEFT or SUBSTRING function.


the OD and Length are correct!!  Excellent  We are running sql 2012 r2
How many rows are there in your table? can you send you data to me in an excel?
Avatar of steven

ASKER

There are many but I only pulled the top 100 and got the error.
test.xlsx
Avatar of steven

ASKER

Blew out on  2" DIA. X 6"  the 60th row...
What should be the output for above.
Avatar of steven

ASKER

I got it used a case to find DIA and use null
Avatar of steven

ASKER

Thank you Pawan.  I was able to use this just fine!  excellent job
Welcome. Happy to help as always. :)