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 -> simple embedded C/SQL question

simple embedded C/SQL question

From: David Doll <djd_at_saul7.u.washington.edu>
Date: 23 Jun 1998 16:50:20 -0700
Message-ID: <7fq3ecv65kz.fsf@saul7.u.washington.edu>

Hello, I have a simple C code program with some embedded SQL in it. I have something like this:

...
char *query_string;
....

query_string = getenv("QUERY_STRING");
....

EXEC SQL DECLARE est_cursor CURSOR FOR
  SELECT library, ESTs
  FROM cluster_annotation
  WHERE query_string;

Note:query_string would look something like db_id=1234

A little later on, I will be printing out something like:

library        ESTs
-------        -------
yodnorm        21345 87649 3008
tumor1         49484 84484

etc.

Now I can't get the syntax correct for the where clause to accept my variable. Could someone explain the correct syntax/method(s) to do this? Thanks for your time and help.

David
djd_at_u.washington.edu

p.s. system info: SunOS 5.5.1, oracle server: 7.2.3.0.0 Received on Tue Jun 23 1998 - 18:50:20 CDT

Original text of this message

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