regular expression in sql server

Ok, how can I write a regular expression which can tell me a particular row data is not correct date, out of a column , in a table with millions of records

column 1
01-Jan-15
01-Jan-15
01-Jan-15
01-Jan-15
01/Jan/15

what regular expression will return me row no. 5 from above table.
BeyondBGCMAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
I confirm that sql server as such does not have have regular expressions.
eventually you don't need such thing, maybe this would be enough already:

where not like '[0-9][0-9]-[JFMASOND][AEPUCO][NBRYLGPVTC]-[0-9][0-9]'
0
 
PortletPaulCommented:
what version of SQL Server is it?

At SQL 2012 TRY_CAST() is available.

select
*
from table1
where try_cast(column1 as date) IS NULL

but the problem with this is performance my be poor on a large table (but the same is likely to be true with alternatives).
0
 
BeyondBGCMAuthor Commented:
but, we can use regular expressions in .net since 1.1 release
0
 
BeyondBGCMAuthor Commented:
ie from 2003
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
yes, in .Net, but not in sql server directly
using .net means you would have to bring all the relevant table data from the server to the .net app
0
All Courses

From novice to tech pro — start learning today.