|
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]
|