RegEx Column Property for Validation - by Eidolon

Status : 

 


16
0
Sign in
to vote
ID 474722 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 7/15/2009 12:03:49 PM
Access Restriction Public
Primary Feedback Item 261342

Description

It would be really awesome to have, in the properties for columns (along with datatype, computed formula, default value, etc) a property which allowed you to define a regex which would be used to check the values entered in to the column.
This would essentially function as an inherent check constraint when there was a value in this RegEx property.
Sign in to post a comment.
Posted by Umachandar [MSFT] on 3/24/2010 at 2:49 PM
Hi,
I have resolved this request as duplicate of feedback item below:

https://connect.microsoft.com/SQLServer/feedback/details/261342/regex-functionality-in-pattern-matching?wa=wsignin1.0

--
Umachandar, SQL Programmability Team
Posted by Eidolon on 7/17/2009 at 11:27 AM
Cool beans! :)

I suppose as long as it supports the full regex syntax, it doesn't really matter so much other than for possible performance implications.
Though it would be cool, if it was done natively, then T-SQL could be enhanced with the same functions to allow direct, native regex coding in SQL too. Of course, then you would also have to rewrite a whole new RegEx engine when the .NET team already has a perfectly good one written.

What to do, what to do! ;)
Posted by Jim [MSFT] on 7/17/2009 at 9:20 AM
Hi,

Thankyou for this request. Yes, this would be a neat feature to add. We have considered two approaches - either native RegEx support, or access, via SQLCLR, to the existing RegEx library available within the .NET Framework.

Anyhow, I'll add this to our growing TODO list.

Thanks,

Jim Hogg