You are here: Re: Regular Expression? « MsSQL Server « IT news, forums, messages
Re: Regular Expression?

Posted by John Bell on 09/06/05 11:26

Hi

If you are generating these queries dynamically they should be removed in
the code that generates them.

You can not change the query once it has been sent to the server unless you
write your own driver, therefore you will have to change the source. You may
want to create stored procedures from these queries rather than use ad-hoc
queries.

John

"NickName" <dadada@rock.com> wrote in message
news:1125970738.466448.247370@g14g2000cwa.googlegroups.com...
>
> I need to remove all the [ and ] in every sql stmt where they are used
> to close encircling numeric value, fyi, all these sql stmt are
> converted from an Access db. For instance,
> select *
> from XYZtbl
> where fieldA = [1] or fieldA = [2] or fieldA = [3]
>
> to be
> select *
> from XYZtbl
> where fieldA = 1 or fieldA = 2 or fieldA = 3
>
> -- and of course I'd have written in as follows, but that's not
> -- the point
> select *
> from XYZtbl
> where fieldA IN (1,2,3)
>
> Thanks.
>

 

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

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