Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Cant see my error in SQL
Hi all,
I have been looking at this script for days - just cant see where the error is. In my script, I have the following logic (does the table exist, if not, create it)....
bk number(30);
PCID number(10);
begin
select count(*) into bk from ALL_TAB_COLS where
table_name='YourLocalTempTable';
if bk=0 then
begin
CREATE TABLE "YOURLOCALTEMPTABLE" <------- * * * Error Line * *
* *
("ID" NUMBER,
"PARENTID" NUMBER,
"ARTICLEID" NUMBER,
etc....
However, when I try to compile it (Ora 10g), get the error...
Line # = 13 Column # = 4 Error Text = PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
Please, somebody take me out of this madness and tell me what is wrong with my script.
Many tahnks in advance. Received on Tue Sep 04 2007 - 11:16:57 CDT
![]() |
![]() |