How do you create a complete database in notepad and execute it in SQL*Plus

I am new to Oracle / SQL*PLUS / and the SQL Language. I have never done anything with these products before. I am running Oracle 9i Enterprise Edition. I have a database created and I was able to get a table created.
That's it so far....
I would like to start doing all coding and editing in Windows Notepad and then execute the code from within the SQL*Plus editor.
Can someone please tell me......How do I do this???
I have my data, that I will be running queries on, located in a text file.
How do I get my SQL code to import the data from a text file into my tables???
Thanks,
Bobby Howerton

Actually, @your_text_file would start executing this textfile - which is ok if there is SQL code in the file. But how I understand the question, is that the data to load into one ore more tables is in the text file. Is that correct?
If so, if it's a lot of data, it's worth entering the documentation on the Server Utilities, search for SQL loader for example.
If it's only a view records, than simply alter the contents to something like:
insert into <put_table_name_here> (<put_column_names_here>) values (<data in the text file, seperated with comma's>);
And there should be one line like this for each record, or look up the command "insert all" in the SQL reference.
Good luck!

Similar Messages

  • How do you create a user defined functions  UDF and passing a value like a ID to GEt a Value.

    How do you create a user defined functions UDF and passing a
    value like a ID to GEt a Value.
    using a query.
    are there example.
    Thanks

    tons of examples at cflib.org - good place to start, even
    though many
    udfs there are a bit outdated in their code...
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • How do you create a jar file with txt and classes?

    Hey, I'm trying to create code to create a jar file with a text file, but I can't figure out how to add the text file. Here is what I have so far:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
            }It creates the .jar file with the correct manifest but I can't get it to write the test.txt or anything else into the jar file.
    -Gandolf
    Edited by: GanMatt on Jun 18, 2009 8:18 AM
    Edited by: GanMatt on Jun 18, 2009 8:19 AM

    Alright, my question has changed. Here's the code:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.write("Hi".getBytes());
                out.flush();
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this,ex.toString(),"BUG!",JOptionPane.INFORMATION_MESSAGE);
            }It creates the jar file with the txt file inside it, but I can't write "Hi" inside of the text file. Any ideas?
    -Gandolf

  • How do You create menu buttons that move up and down with a remote?

    I have six menu items that are linked to their proper locations. When I simulated it a Hand moves over the proper choice then when I click there we go.
    But on the DVD simulator you can't navigate. I thought maybe I would bring in one of the templates to use their buttons I can't get my images to replace theirs. Any help appreciated.
    Jerome

    Take a look here to make sure buttons are being set properly
    http://dvdstepbystep.com/buttons07m.php
    And download the movie if you like
    I create a button, then set the text and include highlights
    I then create another button, then set the text and the include highlights
    I then click on the menu and go to the inspector to see colors
    RED Normal
    BLUE Selected
    YELLOW Activated
    In simulater I then use the remote control and CANNOT navigate through the buttons
    I stop Simulator and then use Auto Assign Buttons Now Command, then relaunch Simulator and get the remote control to work
    Make sure to link the button to the track you want to go to.
    I thought the issue is that you cannot navigate the buttons with the remote control? If you only have one button on the screen, it will always be selected (Yellow in your project as described)
    If it is flashing Megenta and nothing happens, it means a target has not been set (or somehow you are targeting the menu again)
    So the only two condiitions you will see is yellow or magenta.

  • How do you create a database link in Forms9i

    I am writting and application that is to connect to multiple databases and do given task, but the triggers I assign to items only work in the database that you connect to for forms to run.
    How do you create a database link in Forms9i?
    Thank you in advance for your reply.
    Travis

    It seems like you will have to have database links set up in all your databases to point to all other remote databases and have a common global naming scheme for all your objects so that no matter what database you log into you will have access to all objects in the universe.

  • My Library shows some albums as separate titles so you can only choose 1 title at a time but not the whole album to be played. How do I create  a complete album ?

    My Library shows some albums as separate titles so you can only choose 1 title at a time but not the whole album to be played. How do I create  a complete album ?

    check out this excellent user tip by Steve MacGuire.

  • How do l create a new database in Oracle 10g Express

    How do l create a new database in Oracle 10g Express, other than the one that is created on installation?

    Hello,
    You cannot create a second XE database on the same server.
    But, Oracle database can support as many Schema as you want.
    "Oracle database" is like "SQL Server Instance" and "Oracle Schema" is like "SQL Server database". I means by this shortcut that for
    the end users accessing to different Schemas looks like accessing to different databases.
    You can have several applications on the same database. Each application has its own Schema and Datafile (Tablespace) structure.
    So on your XE database you can add a new Tablespace and create a new User/Schema as follows:
    sqlplus /nolog
    connect / as sysdba
    create tablespace {color:red}new_tablespace_name{color}
    extent management local autoallocate
    SEGMENT SPACE MANAGEMENT AUTO
    datafile '{color:red}complete_datafile_name{color}' size 100M autoextend on next 10M maxsize unlimited;
    create user {color:red}new_schema_name{color} identified by {color:red}password{color}
    default tablespace {color:red}new_tablespace_name{color}
    temporary tablespace TEMP
    quota unlimited on {color:red}new_tablespace_name{color}
    grant connect, resource to {color:red}new_schema_name{color};Then you can connect to this new User/Schema as you defined it and create your new structure and load datas.
    Hope it can help.
    Best regards,
    Jean-Valentin

  • How we can create Oracle 9i Database through Commands.

    How we can create Oracle 9i Database through Commands.
    We need step by step process and all the scripts.

    CREATE DATABASE
    Caution:
    This statement prepares a database for initial use and erases any data currently in the specified files. Use this statement only when you understand its ramifications.
    Note Regarding Security Enhancements:
    In this release of Oracle and in subsequent releases, several enhancements are being made to ensure the security of default database user accounts.
    To provide guidance for configuring Oracle9i in a secure manner, Oracle Corporation provides a security checklist. Oracle Corporation recommends that you read this checklist and configure your database accordingly. The security checklist can be found at the following URL:
    http://otn.oracle.com/deploy/security/oracle9i/pdf/9iR2_checklist.pdf
    Examples
    Creating a Database: Example
    The following statement creates a database and fully specifies each argument:
    CREATE DATABASE sample
    CONTROLFILE REUSE
    LOGFILE
    GROUP 1 ('diskx:log1.log', 'disky:log1.log') SIZE 50K,
    GROUP 2 ('diskx:log2.log', 'disky:log2.log') SIZE 50K
    MAXLOGFILES 5
    MAXLOGHISTORY 100
    MAXDATAFILES 10
    MAXINSTANCES 2
    ARCHIVELOG
    CHARACTER SET AL32UTF8
    NATIONAL CHARACTER SET AL16UTF16
    DATAFILE
    'disk1:df1.dbf' AUTOEXTEND ON,
    'disk2:df2.dbf' AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
    DEFAULT TEMPORARY TABLESPACE temp_ts
    UNDO TABLESPACE undo_ts
    SET TIME_ZONE = '+02:00';
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_55a.htm#SQLRF01204
    Joel P�rez

  • How do you create a counter/or increment a number in SQL Developer?

    How do you create a counter/or increment a number in SQL Developer?
    for example:
    x = x + 1; // add 1 to the value of x
    Thanks,

    Thank you for your help. In reply to your comment I notice that I forgot the colon ":" when I "DECLARE x = 0;"
    When I fixed the "DECALARE x := 0;" the code works fine. See below:
    SET SERVEROUTPUT ON
    Declare
    x integer :=0;
    BEGIN
    -- use a FOR loop to process a series of numbers
    FOR i in 1..3 LOOP
    x := x + 5; ---// add 1 to the value of x
    DBMS_OUTPUT.PUT_LINE('Counter: ' || TO_CHAR(x) || ' Square: ' || TO_CHAR(i*i));
    END LOOP;
    END;
    ---------------- OutPut ----
    anonymous block completed
    Counter: 5 Square: 1
    Counter: 10 Square: 4
    Counter: 15 Square: 9
    ====================================
    Thank you again and greatly appreciate your feedback.
    Have a great day!!

  • How do you create a border around text?

    how do you create a border around text?

    Can you be a little more specific about what you are trying to do and the application that you want to use? The methods can vary depending on the application and who published it. For instance, if you're using Final Cut Pro here is a discussion describing how the border can be created.
    https://discussions.apple.com/thread/1470384?start=15&tstart=0
    If you are using an Apple branded application you can also post in the specific forums for those applications in order to help ensure a complete response.
    https://discussions.apple.com/community/ilife
    https://discussions.apple.com/community/iwork
    https://discussions.apple.com/community/professional_applications

  • How do you create a link to a pdf in Muse? Thought it was going to show that with Katie's menu and can"t find in any of the tutorials.

    How do you create a link to a pdf in Muse? Thought it was going to show that with Katie's menu and can't find in any of the tutorials.

    The steps would be :
    - Add files from file menu > select pdf > add to site
    - Select the content (rectangle,text etc) and click on hyperlink dropdown > it should show you the added files list
    - Select the file you want to link
    Thanks,
    Sanjit

  • How do you create a new apple id on the iphone

    how do you create a new apple id on the iphone 4?

    Why do you want to do that?

  • How would you create a read/display only applicaiton montior role for SRM

    Hello,
    I was hoping to get some insight on how to create a display/read only SRM Application monitor role.  This role would be used by our Service Desk to perform basic trouble shooting before escalating.  Currently in our system it is tied into a tab named SAP Administration and has the capability of doing more than read.  How do you create a read version of this to only display the application monitoring in read mode? We currently have an SRP role that has the followiing auths below.  Would a EPP portal role need to be created and if so how>  Thank you for any assistance.
       Manually   BBP Component                                                BBP
              Manually   SRM: General Access Authorizations in EBP                    BBP_FUNCT
               Manually   SRM: General Access Authorizations in EBP                    T-SD59003000
                 Function in SRM (for Authoriza MON_ALERTS                                                                  BBP_FUNCT
    - Todd

    Hello,
    I was hoping to get some insight on how to create a display/read only SRM Application monitor role.  This role would be used by our Service Desk to perform basic trouble shooting before escalating.  Currently in our system it is tied into a tab named SAP Administration and has the capability of doing more than read.  How do you create a read version of this to only display the application monitoring in read mode? We currently have an SRP role that has the followiing auths below.  Would a EPP portal role need to be created and if so how>  Thank you for any assistance.
       Manually   BBP Component                                                BBP
              Manually   SRM: General Access Authorizations in EBP                    BBP_FUNCT
               Manually   SRM: General Access Authorizations in EBP                    T-SD59003000
                 Function in SRM (for Authoriza MON_ALERTS                                                                  BBP_FUNCT
    - Todd

  • How do you connect your photoshop elements on your computer to your account online? and how do you create a customized url? how does the gallery work and how do you access it? i have trouble signing in on my program from my computer to connect to the onli

    how do you connect your photoshop elements on your computer to your account online? and how do you create a customized url? how does the gallery work and how do you access it? i have trouble signing in on my program from my computer to connect to the online photoshop, and I really want to create my own customized url and post photos to my gallery and share them with the world, family, and friends, but i need help because i can't figure how to do any of this, would really appreciate feedback and assistance, thanks, - claire conlon

    To add to sig's reply, "calibrating" does not calibrate Lithiu-Ion batteries, it calibrates the charge reporting circuitry.  If you look at the effect of deep discharging Lithium-Ion batteries in the data from the independent test group, Battery University, you will see that doing so shortens the life of the battery significantly. It looks like an optimum balance between use and life is at a discharge level of 50%.

  • HT4191 iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.

    iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.  I've seen reference to the  "My iPhone" local storage put no mention on how you create this folder or access this folder within the Notes app.  I realize storing information in a local storage like this provides no syncing between other iDevices but that is exactly what I'm looking for.  I'm running iOS7.0.4 on a iPhone 5S, and a iPad Air.  Any help would be greatly appreciated.

    If you go to Settings > Notes > Default Account you will see "On My iPhone" as the default account and the only choice if you have not enabled syncing Notes in Settings >iCloud or Settings > Mail, Contacts, Calendars. If you have enabled syncing you can still select "On My iPhone" as the default account. When you are in the Notes app you won't see any accounts listed if you have not enabled syncing because they are all in the On My iPhone account and that is the only place possible. It is not a folder that you create.

Maybe you are looking for

  • Cisco SIP Phone 9971 won't register on CME 8.6 or 8.5 Please HELP

    Please help me , I have problem with registering Cisco SIP phone 9971 with CME 8.6 on ISR 2901. I configured CME for SIP clients, then I add configuration for 9971 phone and create profiles.  Phone downloaded SEP...xml file from CME,after that phone

  • I want to open a PDF file and i can't? any advice?

    I want to open a PDF file and i can't? any advice?

  • Cover Flow, A-C Reboot

    Hi My images for cover art don't show for covers starting A thru C When i try to play an A-C song my ipod crashes and restarts Any suggestions/ Have tried updating software and reinstalling thanks

  • XOR ing more than 2 bytes

    Hello, As part of a device driver I am writing I need to create a checksum that is the XOR of all the bytes in the message. Does anyone know of a way to perform this? I have tried this: xor = a ^ b ^ c but the program first creates XOR of a and b the

  • Including SCEP client in an image

    My manager would like us to include the SCEP Client in our base image. I did not find any best practices articles on this. If the computer image being captured is not managed in any way are there any GUID files to remove before capture?