Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: CREATE GLOBAL TEMPORARY TABLE -- with Pro*C syntax failure
A copy of this was sent to Sergey Lukashevich <lukash_at_rosno.ru>
(if that email address didn't require changing)
On Tue, 22 Jun 1999 18:18:50 +0400, you wrote:
>
>I am experiencing trouble trying to
>'CREATE GLOBAL TEMPORARY TABLE'
>within a Pro*C program.
>The program even can not be pre[Pro*C]essed!
>It seems that Pro*C for Oracle8.1.5,
>from http://technet.oracle.com (which comes on
>a CD along with Oracle8.1.5 for NT)
>can not handle 8i's syntax properly.
>
>The corresponding error message look like
>
>---------------------------------------------------------------------------
>
> create GLOBAL Temporary table otchMM (
>............................1
>PCC-S-02201, Encountered the symbol "table" when expecting one of the
>following:
>
> ; random_terminal
>
>---------------------------------------------------------------------------
>
>
>
>Of course, the same SQL-clause brings no errors when
>issued against Oracle server via SQL*Plus.
>
>Does anyone else know about such an obstacle?
>Is it a bug or just my fault?
>
Its a bug. I filed it (bug# 914686) this morning....
Workaround would be:
static void process()
{
varchar sqlstmt[100];
strcpy( sqlstmt.arr, "create global temporary table t ( x int )" ); sqlstmt.len = strlen( sqlstmt.arr );
exec sql whenever sqlerror do sqlerror_hard(); exec sql execute immediate :sqlstmt; }
>
>
>
--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Jun 22 1999 - 09:55:46 CDT
![]() |
![]() |