steven
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" .
What output you need from your input.
Are those mathematics expressions?
ASKER
Sorry not mathematics, just a measurement. I need the numbers only
"4 X "5.02 X "5.32 -------> 45.025.32 ??
ASKER
No just 4
5.02
5.32
5.02
5.32
3 rows ?
ASKER
One row would fine with each value
Do you have a table where these values are stored?
ASKER
Yes columns od, id, length
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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?
ASKER
There are many but I only pulled the top 100 and got the error.
test.xlsx
test.xlsx
ASKER
Blew out on 2" DIA. X 6" the 60th row...
What should be the output for above.
ASKER
I got it used a case to find DIA and use null
ASKER
Thank you Pawan. I was able to use this just fine! excellent job
Welcome. Happy to help as always. :)