pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul E Stephens <phitau@home.com>
Subject: Replacing PREPARE
Date: Thu, 22 Apr 1999 19:39:18 -0400
Message-ID: <4.2.0.32.19990422193209.00a42e60@mail.hwrd1.md.home.com> (raw)

Hello all,

I have been given some C code that contained some of Oracle's SQL 
calls.  One of the types of call is a fetch that uses the PREPARE 
command.  I am having trouble coming up with a work around and would 
appreciate any suggestions.

Code snip:

sprintf( query, "SELECT first, second FROM table_name where %s = %s", 
value1, value2 );

EXEC SQL PREPARE :select_str USING :query;

EXEC SQL DECLARE my_cursor CURSOR FROM :select_str;

EXEC SQL OPEN my_cursor;

EXEC SQL FETCH FORWARD 1 IN my_cursor INTO :value1, :value2;

Thanks in advance,
Paul E Stephens




Message-ID: <4.2.0.32.19990422193209.00a42e60@mail.hwrd1.md.home.com>
Permalink:  ../4.2.0.32.19990422193209.00a42e60@mail.hwrd1.md.home.com/
Also on:    postgresql.org/message-id/4.2.0.32.19990422193209.00a42e60@mail.hwrd1.md.home.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: phitau@home.com
  Subject: Re: Replacing PREPARE
  In-Reply-To: <4.2.0.32.19990422193209.00a42e60@mail.hwrd1.md.home.com>
  References: <4.2.0.32.19990422193209.00a42e60@mail.hwrd1.md.home.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox