Re: Using sql statement in FORMS 5

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 3 Jul 1999 20:27:36 GMT
Message-ID: <7llrno$86c$1_at_nntp.csufresno.edu>


In article <30E510CDA7A25AC5.6AAA46DF726B4DDD.6B599ECD3AF63F3F_at_lp.airnews.net>, wozi <wozi_at_dhc.net> wrote:

> I am using forms5 and I am trying to construct a sql statement to be
> used by CREATE_GROUP_FROM_QUERY. Example:
> group_id := create _group_from_query('List_Elements', sql_stat)
>
> this sql statement does not work. The problem for me is how to get
> 'like Mary%' into a quote of its own.
> sql_stat := 'SELECT lastname'||', '||lastname'
> ||'FROM people '
> ||'WHERE LASTNAME LIKE '
> ||':GLOBAL.NAME%';
Not sure what you mean on the first line. Assuming you want your select to look like this: Select Lastname||', '||Firstname ... here is what you need:

SQL_Stat := 'SELECT lastname||'', ''||firstname'
         || '  FROM people'
         || ' WHERE lastname like '''
         || :GLOBAL.NAME||'%''';

Steve Cosner
http://members.aol.com/stevec5088 Received on Sat Jul 03 1999 - 22:27:36 CEST

Original text of this message