Re: query about pdl
Jun Yamog <[email protected]>
| Newsgroups | gmane.linux.redhat.ccm.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Its possible to do this. I forgot to answer my own question, I think
its related to this post.
https://listman.redhat.com/archives/redhat-ccm-list/2004-March/msg00004.html
Anyway here is how to pass in multiple values to a query param.
In your pdl you may have something like this.
select * form foo where bar in (:barparam);
In you java code you will use an ArrayList. So its something like this.
ArrayList barParamList = new ArrayList();
(put values to array list)
(call the query... SessionManager.getSession().retrieveQuery.... )
myquery.setParameter("barparam", barParamList);
So by using an ArrayList the pdl will parse it and put them in separate
values. I thank RedHat for originally answering my inquiry, I hope this
helps you and someone reading this in the future.
Jun
On Thu, 2004-04-01 at 15:53, Emmanuel Gaillot wrote:
> Greetings,
>
> > hi iam writing a query in PDL file for select
> > and passing a string value (2,4,6)from java like this
> (...)
> > i have problem this (2,4,6) value is not comming hare
> > and not able to further proceeds and when i pass one value ("3") then
> > it is working
>
> How do you determine that the "(2,4,6)" value doesn't go through? That
> the "3" value does? What does the SQL query in which you inject those
> values look like?
>
> -- Emmanuel.
>
--
Redhat-ccm-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/redhat-ccm-list
Archives: https://www.redhat.com/pipermail/redhat-ccm-list/