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: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 3 Jun 1999 20:13:58 +0200
Message-ID: <928433545.27844.0.pluto.d4ee154e@news.demon.nl>


Hi Ed
A few remarks (and even I still make this mistake ocassionally) 1 the contents of a sql buffer are supposed to be a sql statement only. In order to get this working a save as in the afiedt.buf would have been necessary
2 string literals in where clauses are enclosed by ', not by " The same remark probably applies to the accept also, but I hardly use that

Don't worry: sqlplus is just as confused by you, as you are by sqlplus. No doubt, you will learn it!

Hth,

Sybrand Bakker, Oracle DBA and fellow victim

Ed Stevens wrote in message <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 Thu Jun 03 1999 - 13:13:58 CDT

Original text of this message

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