Reply to Re: Search for specific length string in column

Your name:

Reply:


Posted by --CELKO-- on 09/16/07 05:20

>> I have a client that was allowing people to store credit card numbers in plain text, in an application. I need to rip through the table and replace every instance of credit card numbers with "x" and the last 4 digits. <<

You might want to learn the difference between a field and column
before you write anymore SQL -- like what a constraint is. I assume
that youmeant 16 digits, broken into groups of 4 digits.

UPDATE Foobar
SET creditcard_nbr
= 'xxxx-xxxx-xxxx-" + SUBSTRING( creditcard_nbr,13, 16);

Having done this, put all of this in the DDL. Mop the floor,but fix
the leak!!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация