Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
SQLNOVICE999
Yak Posting Veteran
62 Posts |
Posted - 2013-03-26 : 11:26:52
|
Hi Guys,I have a column that may have Credit Card number(s) in the string. What I need to do is find out rows that has credit card number(s) in this column. But this column will also have couple of dates in it. Any better suggestion please... This column can have multiple CC#s!!! Anyone has any function to find the CC#?Thanks,Laura |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2013-03-26 : 11:52:08
|
1. There's no easy way to parse credit card numbers using SQL, especially multiples, especially if they have multiple formats.2. I hope you don't have to comply with PCI or similar regulations, since storing unencrypted card numbers is a violation. 2a. And even if you don't have to comply, your company is open to all kinds of lawsuits should there be a security breach.As far as finding the credit card numbers, the only reasonable solution I can think of is to use regular expressions. You can use a SQLCLR function to perform these kinds of matches:http://msdn.microsoft.com/en-us/magazine/cc163473.aspxBut first and foremost, you need to clean those out of your database and change how that data is entered into your system (or not at all). Google "largest credit card breaches" for more info on the potential consequences. |
|
|
SQLNOVICE999
Yak Posting Veteran
62 Posts |
Posted - 2013-03-26 : 12:10:57
|
Thanks Rob for the response. Yes we have made changes to the application; however, I need to find the records in database (in that particular column) where there is at least one CC# in the string. We will then plan to take correct measures to obfusicate this. |
|
|
|
|
|