Reply to Re: Search for specific length string in column

Your name:

Reply:


Posted by Hugo Kornelis on 09/15/07 08:25

On Fri, 14 Sep 2007 21:38:51 +0000 (UTC), Erland Sommarskog wrote:

>Hugo Kornelis (hugo@perFact.REMOVETHIS.info.INVALID) writes:
>> Are you sure you need to check only the first character for numeric? All
>> my credit cards have only numbers. To test for length 14 and only
>> numbers, you can change the above to
>>
>> WHERE LEN(YourColumn) = 14
>> AND YourColumn NOT LIKE '%[^0-9]%'
>
>And my two credit-cards have 16-digit numbers...

Heh! So has mine - I didn't even think of that while posting my reply.

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

[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

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