You are here: Re: SQL IN Query « MsSQL Server « IT news, forums, messages
Re: SQL IN Query

Posted by @sh on 05/22/06 12:46

Many thanks for all the help posted in response, I think I'll take the
suggestion below although do take into account all points raised, especially
that regarding SQL Injection - this application isn't a public one, its
within a secure administration panel, therefore the user would first have to
get beyond the security aspect before they could even attempt such an
exploit.

Also, all users are actually staff and so the risks are minimal.

Thanks once again!

Cheers, Ash

"Hugo Kornelis" <hugo@perFact.REMOVETHIS.info.INVALID> wrote in message
news:5nfs62p9nikiuv18v1mk2c2a2sk9podief@4ax.com...
> On 19 May 2006 05:44:05 -0700, SQL wrote:
>
>>--This should return only 2's that are not part of a bigger number
>>select * from tbl_listids where PropertyID like '%,2,%' OR
>>PropertyID like '2,%'
>>or PropertyID like '%,2'
>
> Hi Denis,
>
> Or (shorter)
>
> SELECT something
> FROM listids
> WHERE ',' + PropertyID + ',' LIKE '%,2,%'
>
> --
> Hugo Kornelis, SQL Server MVP

 

Navigation:

[Reply to this 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

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