Simple escape question for Birt [message #205178] |
Wed, 06 December 2006 17:53  |
Eclipse User |
|
|
|
Originally posted by: thadfield.no.spam.hotmail.com
I have a simple query something like this:
Select * from myTable where myTable.hval =
UNHEX('87973A9267E4EE9EED56624A79DA0A53');
The problem is I want the hex value to be a parameter. I am not quite sure
how to account for the quotes, and how to escape them. The following works:
Select * from myTable where myTable.hval = UNHEX(?);
If I pass in '87973A9267E4EE9EED56624A79DA0A53'
The problem is I want to be able to pass in 87973A9267E4EE9EED56624A79DA0A53
without the quotes, but I can't seem to escape my Select statement properly
for Birt to work.
Any help appreciated,
Tony
thadfield@hotmail.com
|
|
|
Re: Simple escape question for Birt [message #205208 is a reply to message #205178] |
Thu, 07 December 2006 01:19  |
Eclipse User |
|
|
|
Originally posted by: eclipse.junga.com
Hey Tony.
I think that the quotes are controlled automatically based on the type of
the paramter. If the dataset thinks its an integer it will not use quotes,
but for a string it does. But I don't think that helps you.
You can manipulate the query any way you want in the dataset's "preopen"
method written in JS. this.queryText holds the query that was specified in
the query section. You can mdify it directly. You write a function that
'fixes' the quotes, or not use a query parameter (?) for this one at all,
and just replace your own symbol (like $(MyParam)) with the unquoted
content.
--BobG
"thadfield" <thadfield@no.spam.hotmail.com> wrote in message
news:el7hkl$jnn$1@utils.eclipse.org...
>I have a simple query something like this:
>
> Select * from myTable where myTable.hval =
> UNHEX('87973A9267E4EE9EED56624A79DA0A53');
>
> The problem is I want the hex value to be a parameter. I am not quite
> sure how to account for the quotes, and how to escape them. The following
> works:
>
> Select * from myTable where myTable.hval = UNHEX(?);
>
> If I pass in '87973A9267E4EE9EED56624A79DA0A53'
>
> The problem is I want to be able to pass in
> 87973A9267E4EE9EED56624A79DA0A53 without the quotes, but I can't seem to
> escape my Select statement properly for Birt to work.
>
> Any help appreciated,
> Tony
> thadfield@hotmail.com
|
|
|
Powered by
FUDForum. Page generated in 0.03562 seconds