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

Home -> Community -> Usenet -> c.d.o.server -> embedded SQL question

embedded SQL question

From: Ronnie Braverman <Ronnie.Braverman_at_dsto.defence.gov.au>
Date: Fri, 17 Jul 1998 14:10:06 +1000
Message-ID: <35AECE9E.BC258EF4@dsto.defence.gov.au>


Hi there,
I am OK with SQL, but am reasonably new with embedded SQL in C++ and hope some guru can help me work out the most optimal way of querying the following (perhaps with a CURSOR): Assume I have a table defined as follows: CREATE TABLE X
   (emp_name VARCHAR[4],
    emp_no NUMBER(5),
    hire DATE);
The function that needs to query the server has the following prototype:
void getData(const char** names, const int* number, data_struct* data); ie this function has to return in 'data' all the rows that match both the list of names AND the list of numbers (note that 'names' is an array of char*).
ps I have assumed that data_struct is defined as struct data_struct
{

   char emp_name[4];
   int emp_no;
   char date[64];
};
Much appreciate the help,
Ronnie Received on Thu Jul 16 1998 - 23:10:06 CDT

Original text of this message

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