Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL beginner question

PL/SQL beginner question

From: Ed Stevens <Ed.Stevens_at_nmm.nissan-usa.com>
Date: Thu, 03 Jun 1999 13:55:43 GMT
Message-ID: <7j61gq$fv6$1@nnrp1.deja.com>


 SQL> edit
Wrote file afiedt.buf
  1 undefine var_tbl_name
  2 undefine var_schema
  3 accept var_tbl_name char prompt "Gimme the table name:"   4 accept var_schema char prompt "I need the schema name:"   5 select table_name, owner from &var_tbl_name   6* where owner = "&var_schema"
SQL> /
Enter value for var_tbl_name: my_table
old 5: select table_name, owner from &var_tbl_name new 5: select table_name, owner from my_table Enter value for var_schema: scott
old 6: where owner = "&var_schema" new 6: where owner = "scott"
undefine var_tbl_name
*
ERROR at line 1:
ORA-00900: invalid SQL statement

I have 2 questions: First, why is it giving default prompting for the variables at lines 5 and 6 before/instead of using the prompts specified at lines 3 and 4. Second, what's invalid about the UNDEFINE statement at line 1?

--
Ed Stevens
(Opinions are not necessarily those of my employer)

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Jun 03 1999 - 08:55:43 CDT

Original text of this message

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