How to load SQL scripts from a text file.

Hi, I tried several times to load a script file/SQL text with 10 different tables and the data, but 10g Express doesen't allows me to do that, can someone direct me or tell me what I do or what I need to adopt a special method to achieve this. I'm sure there must be something where you can download SQL scripts from a text file (in the SQL command editor!). Thank you

Hello

Yes, as Aust replied, you must use SQL Workshop/SQL Script, instead the command SQL Editor.

Sqlplus can also do so, I think, as well as SQL Developer, now it is 1.5.

sqlplus: (the window command line, black of sql)

SQL > @path /--(l'extension devrait être.sql) filename.sql.

Peter

Tags: Database

Similar Questions

  • Load the data from a text file into a table using pl/sql

    Hi Experts,

    I want to load the data from a text file (sample1.txt) to a table using pl/sql

    I used the pl/sql code below

    ***********************************
    declare
    f utl_file.file_type;
    s varchar2 (200);
    c number: = 0;
    Start
    f: = utl_file.fopen('TRY','sample1.txt','R');
    loop
    UTL_FILE.get_line (f, s);
    insert into sampletable (a, b, c) values (s, s, s);
    c: = c + 1;
    end loop;
    exception
    When NO_DATA_FOUND then
    UTL_FILE.fclose (f);
    dbms_output.put_line('No. deles de lignes insérées: ' || c);
    end;

    ***************************************

    and my sample1.txt file looks like

    ***************************************
    1
    2
    3
    ***************************************

    Gets the data inserted, with way below

    Select * from sampletable;

    A, B AND C

    1-1-1
    2-2-2
    3 3 3

    I want that data to get inserted as

    A, B AND C

    1 2 3

    The text file I have is to have three lines, and the first value of each line should go to each column

    Help, please...

    Thank you
    declare
    f utl_file.file_type;
    s1 varchar2(200);
    s2 varchar2(200);
    s3 varchar2(200);
    c number := 0;
    begin
    f := utl_file.fopen('TRY','sample1.txt','R');
    utl_file.get_line(f,s1);
    utl_file.get_line(f,s2);
    utl_file.get_line(f,s3);
    insert into sampletable (a,b,c) values (s1,s2,s3);
    c := c + 1;
    utl_file.fclose(f);
    exception
    when NO_DATA_FOUND then
    if utl_file.is_open(f) then utl_file.fclose(f); ens if;
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;
    

    SY.

  • How to extract specific data from a text file

    Hello world

    For my project, it is necessary that a parameter file is read at the beginning, so that variables be initialized with specific values that change with the user.

    For now, the mode of action is as follows: the values in a sequence specified in a text file are read and saved in a table and the elements of the array are extracted according to their index.

    The problem with this implementation is, that if for any reason any changes file format, for example we want to use a settings file from a previous version of the program, which has the values for the variables of same but in a different order, the only way to have good values for the parameters is to change everything accordingly which is really time wasting.

    Could someone suggest another implementation that make reading the different values independently of their order in the file, for example by analysing the file for specific strings and by reading the value after the string?

    Thank you very much.

    P.S. I've attached a screenshot of the routine, which I use now.

    Hi panagiov,

    Find attached files.

    Method 1: in this you can search for each variable separately. You can use "Live Config file" to get all the keys (variable) at a time, and then you can use for loop to get their values. Or you can access values as indicated in the present code.

    Method 2: Here you will have all the data at once. You will get variables and data (table 2D), you should look for the variables as needed.

    I hope you understand these methods.

    Good luck

  • Problem with loading Variables from a text file

    Hello

    I'm quite a novice when it comes to scripts and I am struggling to achieve something quite simple. I want to have an external text file that will allow me to control the number of timeout that I reference in my code below. I need to be able to change this variable by editing a simple text file.

    var myTimer:Timer = new Timer(60000,1);
    

    I want to change the 60000 and 1.

    I followed what looks like a nice clean approach to this tutorial: http://www.designscripting.com/2012/01/as3-flash-loading-variables-from-a-text-file/

    However, when I'm stuck is how to reference my variable imported into the code. I tried 'name1' but it does not work. I get ' 1067: Implicit coercion of a value of a numeric type to a type unrelated string.' error '

    I'm an output:

    HTTP status = 0

    Data loaded

    Name1: undefined

    {name2: 1}

    http://screencast.com/t/gwD09jovIrb4

    I use CS5 and AS3.

    Thank you

    Dan

    I see nothing wrong with what you show, and when I try I get the following output...

    HTTP status = 0

    Data loaded

    Name1: 6000

    name2: 1

    The only thing I suspect for the moment is the data file itself.  I can reproduce the problem if I insert white space before this string, then make sure that the text string is not preceded by anything whatsoever.

  • I'm doing a script that takes a list of e-mail from a text file and then allow me to select a save as a string. I found some ways to get the path of the file, but I'm in check by pulling the list

    I found some ways to get the path of the file, but I am defeated by pulling the list from that. the function of the path get gives me the path as "Macintosh Users:: Documents: extractedb.txt (myUsername).

    What I can't understand is how to get a dialog box to display a list that represents the content in the text file, I need to change the contents of the text file, I need the box to show me what I chose and I want to save my selection as a single string.
    e '.

    example of extractedb.txt information:

    [email protected]

    [email protected]

    [email protected]

    * has a random number of emails as well *.

    I want this is to pull those emails from the text file and turn them into a list so I can get to be a selection in my dialog box.

    Any help would be great = D

    Assuming you have a text file with your example e-mail addresses, the following AppleScript will read this file in a list (mf_List) and then use this list as input to choose among the list. Because multiple selection is allowed (control button), the output is sent to a list (sel_addr). We check if the Cancel button was pressed by testing for false and if this condition is met, we the script error.  Based on a single or multiple list item content of the list, display accordingly.

    game of mf to ((path to the folder as text) & "mail_list.txt")

    the value mf_List to {}

    the value sel_addr to {}

    the value mf_List to paragraphs of (read file mf)

    the value sel_addr to (choose from the list mf_List with title ¬

    ('Mail list' with multiple selections allowed without empty selection allowed)

    If sel_addr is equal to false then

    Error number-128

    return

    end if

    If length of sel_addr is equal to 1 then

    sel_addr display dialog box as text

    on the other

    the value Point to the text of TID to AppleScript delimiters

    the value Point text in AppleScript return delimiters

    display the dialog box elements of sel_addr in the text

    the value Text of point AppleScript delimiters to TID

    end if

    return

  • Dynamic text from the text file problem

    Go step by step to get my data from MYSQL/php... for now, I'm stuck and cannt even get it from a text file I do worng!

    This is the code I use:

    var myLoader:URLLoader = new URLLoader()

    myLoader.dataFormat = pouvez

    myLoader.load (new URLRequest ("trees.txt"))

    myLoader.addEventListener (Event.COMPLETE, onDataLoad)

    function onDataLoad(evt:Event) {}

    for (var i: uint = 0; i < evt.target.data.cant; i ++) {}

    This ["tcname_" + i] .text = evt.target.data ["tcname_" + i]

    }

    }

    My trees.txt file contains the following:

    Plum = tcname_0 & tcname_1 = olive

    I made this as well:

    & tcname_0 = Asian plum & tcname_1 = Amazon lily &

    I have already created a few instances of dynamic text from tcname_0 up to tcname_5

    I tried with having the text in dynamic text or leave it empt anyway... nothing is read from the text file, what I am doing wrong?

    In your trees.text file, you neglected to include the variable of cant, so the loop has an undefined value to life...

    Plum = tcname_0 & tcname_1 = olive & cant = 2

  • Average data from multiple text files

    I am new to labVIEW so any help is appreciated:

    I have a 100 txt files with two columns (separate tab) for a value of X and Y.

    I need the average of the values of Y to generate a single file and generate X against Y graph.

    So, how to read the data of these text files? (without having to select each one individually) and the average data and create a chart XY him?

    Thanks in advance

    There is a function to list folder in the palette of the file i/o that will return an array of file names.  Feed this table in a loop to open and read each file in turn.  Put in a new file, build a table with her, process the data or do whatever you want.

  • How to find the largest number of text file

    I use the "Read from the text file" block to read the data in my .txt file in labview.  It is now in the string format.  I have a lot of numbers in the file.

    For example:

    0.45

    0.35

    0.12

    1,354

    1.56

    2.89

    5.89

    0.56

    That's what might look like a text file.  I want to find out which of these numbers is larger and do calculations with this number.  I have problems with channels/number/berries formats, etc.  Thank you

    Try to read that the file with File.vi reading worksheet with transposes the True value. Then use the table Max & Min to get the biggest number in the table.

    Lynn

  • How to move Windows program from Windows.old files after you do a re-installation of my Vista Home Premium?

    How to move Windows program from Windows.old files after you do a re-installation of my Vista Home Premium? Can I move the program files or do I have to reinstall each program with the cd that came with the applicable programs? I know how to move all the other files. I do not know how to move the program files. Thank you in advance for help you.

    You can't move programs from Windows.OLD.  The programs need to be reinstalled.

    Sorry, but that's how.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How to create the script to compile procedure files in oracle - urgent deadline...

    How to create the script to compile procedure files in oracle.    about to go live and have much .prc pkg in a directory usr/tmp/ar... Po... human resources etc. need to create a script to compile all the files in the folder, then do not open all necessary .prc suggestions on how to do it.   Thank you Tom.

    (1) an urgent need, ASAP,... are words that do not in a forum of volunteer. We are here to help if you need it now, for free, open a SR.

    (2) oracle procedures are not files.

    (3) I think you are trying to run operating system packages, no Oracle procedure. right?

  • How can I delete pages from a pdf file

    How can I delete pages from a pdf file

    Hi question renna,.

    To remove the pages of a PDF file, you must use Acrobat (choose Remove in the Pages pane on the tools Panel). If you do not have Acrobat, you can try it free for 30 days. See www.adobe.com/products/acrobat.html for more information.

    Best,

    Sara

  • How to create a DataControl from the Java file

    How to create a data from the Java file control

    Hello
    Try like that after the example, you will get the answer

    1. Create Page.java

    public class {Page}
    private String pageName;
    private String pageAction;
    public Page() {}
    Super();
    }

    public Page (pageName, pageAction String String) {}
    Super();
    this.pageName = name of the page;
    this.pageAction = pageAction;
    }

    {} public void setPageName (String pageName)
    this.pageName = name of the page;
    }

    public String getPageName() {}
    Returns the name of the page;
    }

    {} public void setPageAction (String pageAction)
    this.pageAction = pageAction;
    }

    public String getPageAction() {}
    pageAction return;
    }
    }

    2. create PageList.java

    import java.util.ArrayList;
    import java.util.List;

    public class PageList {}

    private pages = new() ArrayList list;

    public PageList() {}
    Super();
    pages. Add (New Page ("Page title 1", "page 1"));
    pages. Add (New Page ("Page title 1", "page 1"));
    pages. Add (New Page ("Page title 1", "page 1"));
    pages. Add (New Page ("Page title 1", "page 1"));
    pages. Add (New Page ("Page title 1", "page 1"));
    }

    public void setPages (list of pages ) {}
    This.pages = pages;
    }

    public {list getPages()
    return pages;
    }
    }

    3. right click in the PageList.java and choose CreateDataControl

    then refresh the DataControl and focus on which a DataControl as PAgeList will be created

    Kind regards
    Felix

  • I'm parsing text from a text file in the dictionary

    I'm parsing text from a text file:

    lmceb = 1.5990 & 1.4504 = lmces & lmcub = 1.9990 & lmcus = 1.8816 & Date = 2009-04-02 11:06:37

    I would like to pass these name value pairs in a dictionary. Could someone show me the easy way.
    Thank you very much

    I thought about it:

    var: result string = event.target.data;
    var array: Array = result.split('&');)
    var: dictionary = new dictionary;
    for each {(s:String var in table)

    var myPattern:RegExp = /(.*) =(.*);
    var things: Array = myPattern.exec (s);
    Dictionary [things [1]] = stuff [2];
    }

  • How to write the result of a SQL query to a text file?

    I'm using Oracle 11 g and SQL Plus.

    I have a large table called side.

    Whenever I do


    SQL > select * rating.

    The output goes well beyond what can show the screen sqlplus. So, I want to store the result of this query in a text file.

    How is that possible? Help, please. Thank you.

    SQL > SPOOL results.txt
    SQL > select * rating.
    SQL > SPOOL OFF

  • How to load xml data to dynamic text under a button (AS3)

    Hi all

    I created a button and put some dynamic text in it. But I can not dynamically load text from an xml file.
    See the code below:

    var xmlLoader9:URLLoader = new URLLoader();
    xmlLoader9.addEventListener (Event.COMPLETE, showXML99);
    xmlLoader9.load (new URLRequest ("mempops.xml"));

    function loadXML99(e:Event):void
    {
    XML.ignoreWhitespace = true;
    var tree: XML = new XML (e.target.data);
    var i: Number;
    for (i = 0; i < fir.mylist.length (); i ++)
    {
    mybuton1. Box1.dyntext1.AppendText (FIR.memberz [i] .mname. Text());
    myButton1 = button
    Box1 = movie clip
    dyntext1 = dynamic text box
    }
    };

    and the error message:
    1119: access of property may be undefined box1 through a reference with static type flash.display:SimpleButton.

    Thanks for the help

    SimpleButtons have very limited property, so you can't really add content in them that code can talk.  Your best bet will be to create the button as a movieclip.  MovieClip objects can have code addressable bjects placed in them and can also have properties assigned dynamically.

Maybe you are looking for