| Author |
Topic  |
|
|
hey_frind
Starting Member
1 Posts |
Posted - 11/22/2012 : 13:31:42
|
Hello, for the following input: 0.740234|0.758789|0.748047|0.749023|0.748047|0.754883|0.743164|0.748047|0.780273|0.739258|0.765625|0.761719|0.760742|||||0.75293|0.742188
I am trying to read each value in between |, if the field is empty , then I want to get empty or null reading.
I have tried to following: REGEXP_SUBSTR({total},'[^|]*', 1, 1) where total is the input string (shown above).
Result is that I get output for where value exists between the pipe (|), but when it is the null (or empty), its not recongized. Please help.
Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47189 Posts |
Posted - 11/25/2012 : 09:34:08
|
how are you trying to parse this? in T-SQL or in .NET?
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
sunitabeck
Flowing Fount of Yak Knowledge
5152 Posts |
Posted - 11/26/2012 : 07:16:41
|
Looks like REGEXP_SUBSTR is an Oracle function, Visakh.
To hey_frind: in Microsoft SQL Server, there is no equivalent function. This forum is for Microsoft SQL Server, so if you are using Oracle, you would get better and faster responses at another forum such as dbforums.com.
I am somewhat jealous of Oracle users now. We sorely need regex capabilities in SQL Server without having to resort to CLR. Hopefully in Sequel to SQL 2012 they will add it. I wonder what sequel to SQL 2012 would be code-named. Kilimanjaro? Everest? |
 |
|
| |
Topic  |
|
|
|