Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Regexp help
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 11/22/2012 :  13:31:42  Show Profile  Reply with Quote
for the following input:

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.


Very Important crosS Applying yaK Herder

52326 Posts

Posted - 11/25/2012 :  09:34:08  Show Profile  Reply with Quote
how are you trying to parse this? in T-SQL or in .NET?

SQL Server MVP

Go to Top of Page

Flowing Fount of Yak Knowledge

5155 Posts

Posted - 11/26/2012 :  07:16:41  Show Profile  Reply with Quote
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

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?
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000