Re: Create_Group_From_Query

From: Jason Judge <jason.judge_at_virgin.net>
Date: Mon, 26 Jul 1999 00:11:43 +0100
Message-ID: <7ng58f$cp6$1_at_nclient11-gui.server.virgin.net>


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 Mon Jul 26 1999 - 01:11:43 CEST

Original text of this message