Skip to main content



      Home
Home » Archived » BIRT » Simple escape question for Birt
Simple escape question for Birt [message #205178] Wed, 06 December 2006 17:53 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Dynamically changing chart size in the Birt Report Designer
Next Topic:is that limited??
Goto Forum:
  


Current Time: Sun May 11 15:22:03 EDT 2025

Powered by FUDForum. Page generated in 0.03562 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top