Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Create_Group_From_Query
Even better, put the bind variables directory into the query string, so:
'SELECT RNumber, RNumber FROM Work_Order WHERE WONumber1 = '||:(bind_variable) || ''''
becomes:
'SELECT RNumber, RNumber FROM Work_Order WHERE WONumber1 = :bind_variable'
The create_group_from_query procedure will bind the variables it finds. This has the advantage that the query is passed to the database engine with bind variables rather than a string, so it will only need to be parsed once - from then on the parsed version will be cached.
Regards,
Jason Judge
Thomas Kyte <tkyte_at_us.oracle.com> wrote in message
news:37a880d5.101209050_at_newshost.us.oracle.com...
> A copy of this was sent to "Courtney Wright" <lili96ilil_at_netzero.com>
> (if that email address didn't require changing)
> On Fri, 23 Jul 1999 10:48:07 -0400, you wrote:
>
> >I'm using Forms 4.5. I'm using the Create_Group_From_Query command to
make
> >and populate a group at run-time. I was able to create the group with
the
> >sql:
> >
> >'SELECT RNumber, RNumber FROM Work_Order'
> >
> >When I add a WHERE to the statement, Oracle doesn't want to create the
> >group. I've tried:
> >
>
> You need to get the quotes into the character string constant.
> Here is each query rewritten:
>
> >'SELECT RNumber, RNumber FROM Work_Order WHERE WONumber1 = '186-98''
>
>
> 'select rnumber, rnumber from work_order where wonumber1 = ''186-98'''
>
> (2 quotes to get 1 quote in a string)
>
> >'SELECT RNumber, RNumber FROM Work_Order WHERE WONumber1 = '||'186-98'
>
>
> 'select rnumber, rnumber from work_order where wonumber1 = ' ||
'''186-98'''
>
>
> >'SELECT RNumber, RNumber FROM Work_Order WHERE WONumber1 = '||:(bind
> >variable)
>
>
> 'select rnumber, rnumber from work_order where wonumber1 = ''' ||
> :bind_variable || ''''
>
>
>
> >
> >Nothing seems to work. Any ideas?
> >
> >Courtney
> >
>
>
> --
> See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to
Oracle8i'...
> Current article is "Part I of V, Autonomous Transactions" updated June
21'st
>
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries Reston, VA USA
>
> Opinions are mine and do not necessarily reflect those of Oracle
Corporation
Received on Sun Jul 25 1999 - 18:11:43 CDT
![]() |
![]() |