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: sqlplus problem

Re: sqlplus problem

From: Mark Richard <mrichard_at_transurban.com.au>
Date: Thu, 01 May 2003 19:42:00 -0800
Message-ID: <F001.0058DD98.20030501194200@fatcity.com>


If you have a file containing multiple SQL statements you can start SQL*Plus and at the prompt type "@filename.sql" to execute a script. An alternative I beleive is "start filename.sql" but that involves typing another four characters in so I don't bother. :-)

                                                                                                                         
                    Jianping Zhu                                                                                         
                    <jzhu_at_fisher.forestr       To:     Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>       
                    y.uga.edu>                 cc:                                                                       
                    Sent by:                   Subject:     Re: sqlplus problem                                          
                    root_at_fatcity.com                                                                                     
                                                                                                                         
                                                                                                                         
                    02/05/2003 13:11                                                                                     
                    Please respond to                                                                                    
                    ORACLE-L                                                                                             
                                                                                                                         
                                                                                                                         




On Thu, May 01, 2003 at 07:51:50AM -0800, DENNIS WILLIAMS wrote:
> Jianping
> There are several ways to accomplish this. If it is a lot of records,
> consider SQLLoader. It can read flat files of various formats. Do you
> already have these records in a file?
>
> Dennis Williams
> DBA, 60%OCP, 100% DBA
> Lifetouch, Inc.
> dwilliams_at_lifetouch.com
>
>
> -----Original Message-----
> Sent: Thursday, May 01, 2003 10:17 AM
> To: Multiple recipients of list ORACLE-L
>
>
> I need to insert lots of record into a table. it it very tedious to type
> in the commnad like this
> sqlplus> insert .....
> sqlplus> insert .....
> .......
> sqlplus>insert.....
>
> I guess i can put the queries in a script then execute it (like in mysql
> i can create a ins.sql script then use source ins.sql to insert all
> recond) i am very new to oralce. and do not know how to do it. Can
> someboday give me some hints?
>
> Thanks
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Jianping Zhu
> INET: jzhu_at_fisher.forestry.uga.edu
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> 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).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: DENNIS WILLIAMS
> INET: DWILLIAMS_at_LIFETOUCH.COM
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services

Thank you for reply.
I do not have any file yet. i will have a files called insert.sql which contain insert statememet:

   insert into customer values("a1", "b1");    insert into customer values("a2", "b2");



   insert into customer values("an", "bn");

is there a way by which i can execute insert.sql to insert this row to table?
in mysql i can use source insert.sql. to do that,  in oralce, is there a simple similar way to do that?

> ---------------------------------------------------------------------
> 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).
>

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Jianping Zhu
  INET: jzhu_at_fisher.forestry.uga.edu

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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).




<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   Privileged/Confidential information may be contained in this message.
          If you are not the addressee indicated in this message
       (or responsible for delivery of the message to such person),
            you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender
           by reply e-mail or by telephone on (61 3) 9612-6999.
   Please advise immediately if you or your employer does not consent to
                Internet e-mail for messages of this kind.
        Opinions, conclusions and other information in this message
              that do not relate to the official business of
                         Transurban City Link Ltd
         shall be understood as neither given nor endorsed by it.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mark Richard
  INET: mrichard_at_transurban.com.au

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Thu May 01 2003 - 22:42:00 CDT

Original text of this message

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