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 -> Re: PL/SQL beginner question

Re: PL/SQL beginner question

From: shailaja <saila_at_irmac.com>
Date: Tue, 15 Jun 1999 16:38:07 -0500
Message-ID: <929482596.635.44@news.remarQ.com>

First Answer


In plsql wherever it finds the '&' symbol the control will be passed first there then it comes to the rest of the statements.

Second Answer


The variable was not at all defined for the very first time i think.

Regards
shailaja.

Ed Stevens <Ed.Stevens_at_nmm.nissan-usa.com> wrote in message news:7j61gq$fv6$1_at_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 Tue Jun 15 1999 - 16:38:07 CDT

Original text of this message

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