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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: simple sql problem

Re: simple sql problem

From: <hemantchitale_at_charteredsemi.com>
Date: Mon, 03 Dec 2001 22:03:08 -0800
Message-ID: <F001.003D4238.20011203213031@fatcity.com>

You can't have the SQL statements on the command line. You must put them in
a script file (eg myscript.sql) and execute it with the @ sign. Thus,
sqlplus -s scott/tiger @myscript [note the SPACE between the "tiger" and the "@"].
Hemant

"Viraj Luthra" <viraj999_at_lycos.com> 04/12/2001 01:10 PM Sent by: root_at_fatcity.com

Please respond to ORACLE-L

                                                                                       
                        
             To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>           
                        
             cc: (bcc: CHITALE Hemant Krishnarao/Prin DBA/CSM/ST Group)                
                        
             Subject: simple sql problem                                               
                        
                                                                                       
                        
                                                                                       
                        
                                                                                       
                        





Hello all,

Why cannot I do :-

sqlplus -s scott/tiger select * from emp;

or sqlplus -s scott/tiger "select * from emp;"

Both the cases I get :-

Usage: SQLPLUS [<option>] [<user>[/<password>] [@<host>]]

               [@<startfile> [<parm1>] [<parm2>] ...] where <option> ::= { -s | -? }
-s for silent mode and -? to obtain version number

What is wrong above? I need to run the query from command line. How do I modify this :-

sqlplus -s scott/tiger select * from emp;

Rgds,

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Viraj Luthra
  INET: viraj999_at_lycos.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). [This e-mail is confidential and may also be privileged. If you are not the intended recipient, please delete it and notify us immediately; you should not copy or use it for any purpose, nor disclose its contents to any other person. Thank you.] -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: hemantchitale_at_charteredsemi.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Tue Dec 04 2001 - 00:03:08 CST

Original text of this message

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