From: | Paul E Stephens <phitau(at)home(dot)com> |
---|---|
To: | mailto: |
Subject: | Replacing PREPARE |
Date: | 1999-04-22 23:39:18 |
Message-ID: | 4.2.0.32.19990422193209.00a42e60@mail.hwrd1.md.home.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Bitmead | 1999-04-22 23:57:32 | Re: [SQL] Finding the "most recent" rows |
Previous Message | G. Anthony Reina | 1999-04-22 22:13:20 | Re: [SQL] Changing the editor for the \e option |