Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Pro*C Help Needed

Re: Pro*C Help Needed

From: Hugo TEOTSKI <teotski_at_laas.fr>
Date: 1997/08/14
Message-ID: <33F2C7C0.2795@laas.fr>#1/1

Ed Tolsch wrote:
>
> I'm trying to use a host variable within a select clause as follows:
>
> EXEC SQL BEGIN DECLARE SECTION
> char HostVar[10][15];
> EXEC SQL END DECLARE SECTION
>
> strcpy(HostVar[0], 'string1');
> strcpy(HostVar[1], 'string2');
>
> select somefield
> from table
> where value in (:Hostvar);
>
> This does not return any values unless I fill up the entire array. Any
> help would be appreciated! Thanks.

hello,

You must use EXEC SQL SELECT .... INTO ... FROM ... WHERE ...

        but not for return more than 1 row.
If you want to return many rows use a CURSOR with a FETCH.

Hugo, Toulouse, France Received on Thu Aug 14 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US