insert excel data sheet in the database

Hello friends

I have an excel file and I want to insert this file into the database can I do? .. . If yes then please tell me how can I do it in a few steps very simple like m beginner in oracle
Thanks in advance

Convert csv file and load it using sql loader.

Tags: Database

Similar Questions

  • Insertion of data in blackberry java database

    Here is my code to insert data into the database

    package mypackage;
    
    import net.rim.device.api.database.Database;
    import net.rim.device.api.database.DatabaseFactory;
    import net.rim.device.api.database.Statement;
    import net.rim.device.api.io.URI;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.component.RichTextField;
    import net.rim.device.api.ui.container.MainScreen;
    
    //class untuk insert data ke database table People
    
    class InsertDataScreen extends MainScreen
    {
        Database d;
        public InsertDataScreen()
        {
            LabelField title = new LabelField("SQLite Insert Data " +
                                              "Schema Sample",
                                              LabelField.ELLIPSIS |
                                              LabelField.USE_ALL_WIDTH);
            setTitle(title);
            add(new RichTextField("Attempting to insert data into " +
                                   "MyTestDatabase.db on the SDCard."));
            try
            {
                URI myURI = URI.create("file:///Store/Databases/SQLite_Guide/" +
                                       "MyTestDatabase2.db");
                d = DatabaseFactory.open(myURI);
    
                Statement st = d.createStatement("INSERT INTO People(Name,Age) " +
                                                 "VALUES ('John',37)");
                st.prepare();
                st.execute();
                st.close();
                d.close();
                add(new RichTextField("inserting data successful"));
                System.out.println( "inserting data successful" );
            }
            catch ( Exception e )
            {
                System.out.println( e.getMessage() );
                e.printStackTrace();
            }
    
        }
    }
    

    I checked this database is exist. When I run the above code, my data has been never inserted in the database, code bellows

    add(new RichTextField("inserting data successful"));
    

    never called.

    Anyone know what is my fault? Please

    Problem solved!

    I have successfully insert data and view the database when I change the location of storage on SD card

    I don't know why, but its probably that blackberry can't save the SQLite database on internal memory (OS7)

  • Inserting a new record in the database using a form empty ADF

    Hello

    I'm trying to insert a new record into the database using a form.

    I have an Employee table and its corresponding entity object and the view object. The table has an id that is used as the primary key and is filled using a sequence in the comic book.

    Data controls, I dragged and dropped at the sight of the employee as a form of ADF and checked the submit button include. Then I dragged and dropped the validation on submit button operation.

    When I connect to the app and go to the page used to create, I have 2 problems:
    1 - the form is filled with the logged in user info.
    2. If I try to change the news and validation, the user info is changed in the database and no new record is created.

    It makes a little sense to me, but I would like to know if there is a way around it (get an empty form and insert a new record).
    NB: the employee id is not part of the form, I want to be filled using the sequence.

    Kind regards
    MB

    User, please tell us your jdev version!

    To do this, you must create a new record before going to the display of the form page. In a stubborn workflow (btf), you drag the operation createInsert of the VO on the btf and it will generate a link method, add a view to the btf and put a navigation of the binding of the method of the page. Mark the method as 'Activity by default'. Now, ren, you call the workflow, you create a new record that will show your blank form.

    Timo

  • Regarding the authorized request property if the data block is the database no.

    I'm now a project located on Oracle Forms 10g.

    There is a DataBlock with certain properties such as

    1 block of data in the databases: No.
    2 query allowed: Yes
    3 interrogate the Data Source Type: table
    4 insert authorized: Yes
    5 update allowed: Yes
    6. Remove allowed: Yes

    If the DataBlock is not database data block are then properties no. 2 to 6 relevent?
    I think these properties must be set to NO and the query data Source Type must be None.
    Can someone help me please.

    Yes... The block of database property must be "NO"... I made the mistake of typo... You can also change other properties... No problem in that

  • AS2 - problem with inserting of partition/name of the database/mysql

    Hello

    First of all... Sorry that I havn't put the ACE in a box, do not know how to do it on this forum!

    Okay, so here's my problem:

    I want to submit my score and the name in my database.

    This is the script I've tried Flash.

    Stop();

    create objects loadVars

    playerx = new LoadVars();

    playerRegistered = new LoadVars();

    playerRegistered.onLoad = showResult;

    create the button handler code to call the function that sends & load php

    _root.submitt.onRelease = submitScore;

    function submitScore (): Void {}

    playerx. Name = name_txt.text;

    playerx.score = score_txt.text;

    playerx.sendAndLoad ("register.php", playerRegistered);

    }

    This is the PHP script:

    <? PHP

    $connect = mysql_connect('x.com.mysql','x','password');

    @mysql_select_db ('x', $connect);

    $sql = "INSERT INTO high_scores_avoidthecars (name, score) VALUES ("'. ")" $_POST ['name']. '"," '. $_POST ['score'].'") ';"

    ? >

    Nothing is posted to the database, no errors etc... any ideas?

    If you went thru the link I provided you should see where you need to change the code that you did to get the Flash to work code.  Here is a link to an example of work that takes into account the second part of the code in this link that involves sending data (from line 28) with your textfields, etc.

    http://www.nedwebs.com/Flash/register.html

    The main problem with your AS2 code involves the following line...

    playerx.sendAndLoad ("register.php");

    It should be...

    playerx.sendAndLoad ("register.php", playerx. 'POST');

    Here's the code I used for the example files, I did...

    AS2 CODE

    playerx = new LoadVars();

    _root.submitt.onRelease = submitScore;

    function submitScore (): Void {}

    Response.Text = "clicked\n";

    playerx. Name = name_txt.text;

    playerx.score = score_txt.text;

    playerx.sendAndLoad ("register.php", playerx, "POST");

    }

    playerx.onLoad = onLoadCallBack;

    function onLoadCallBack (success)
    {
    Response.Text += "onLoad Processed\n";

    {if (success)}
    Response.Text += "Success\n;
    Response.Text += this.lVar1 + "\n";
    Response.Text += this.lVar2;
    } else {}
    Response.Text = "load error".
    }
    }

    PHP CODE

    <>
    read the variables
    $var1 = $_POST ['name'];
    $var2 = $_POST ['mark'];

    Send variables
    echo "& lVar1 = $var1 return &";.
    echo "& lVar2 = $var2 returned as well &";.
    ?>

  • Problem with insertion of Hebrew language in the database.

    Hello

    I have improved my application Access Layer of NHibernate 1.2 to NHibernate 3.0 data.

    I have configured the database using ODP.net 11 g on upgradation.

    On insertion, it is not to throw any exception, but the Hebrew data goes like '?

    Can I get any pointer that why it's happening now.

    Here is my setup of NHibernate.

    < db:provider id = "AMACDbProvider".
    Provider = "OracleODP - 2.0".
    connectionString = "Data Source = EP;" User ID = AUSER; Password = AER1234; "/ >
    <! - for creating factory objects - >
    < object id = "NHibernateSessionFactory" type = "Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate30" >
    < property name = "Dbprovider" ref = "AMACDbProvider" / >
    < property name = "MappingAssemblies" >
    < list >
    < value > CacheMappings < / value >
    < / list >
    < / property >
    < property name = "HibernateProperties" >
    < dictionary >
    < key = "hibernate.connection.provider entry" value ="NHibernate.Connection.DriverConnectionProvider" > < / entry > "
    < enter key = "dialect" value = "NHibernate.Dialect.Oracle10gDialect" > < / entry >
    < key = "connection.driver_class entry" value ="NHibernate.Driver.OracleDataClientDriver" > < / entry > "
    < key = "enter proxyfactory.factory_class"
    value = "NHibernate.bytecode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" / > "
    < Enter key = "hbm2ddl.keywords" value = "none" / > "
    < / dictionary >
    < / property >
    < / object >

    Windows 1255 codepage is supported by the Hebrew alphabet. (ISO 8859-8 it is.)

    You will find the names of Oracle to support these character sets, if you search for "Latin/Hebrew" in table A-4 (recommended database character sets):
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e10729/applocaledata.htm#i635016

    If language letters provided by only Win - 1255 (IW8MSWIN1255) does not satisfy your app needs, you should consider migrating to the universal language support which is Unicode. Game for Unicode characters in Oracle database are named AL32UTF8.

    http://download.Oracle.com/docs/CD/E11882_01/server.112/e10729/ch6unicode.htm
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e10729/ch11charsetmig.htm

    Published by: orafad on August 1, 2011 20:24

  • put the offline data file when the database is in NOARCHIVELOG mode

    My question is when the database is in log mode Archive No. I am not able to take the database offline.

    When I tried in my computer I noticed set-aside.

    CASES1:

    SYS > alter database datafile 5 offline;

    ERROR at line 1;

    ORA-01145: offline immediately rejected at least media recovery enabled.

    case 2:

    SYS > alter database datafile 5 immediate offline;

    ERROR at line 1;

    ORA - 00933:SQL not correctly completed order

    CASE3:

    I tried the command drop alter database datafile offline 6; (in NOARCHIVELOG mode) and it is to show the same effect that alter database datafile offline 6; (in ARCHIVELOG mode).

    * In NOARCHIVELOG mode are we really drop the data file to use the offline data file? You please tell me the effect of the dropkeyword.

    Oracle protects you. Please review ARCHIVELOG and NOARCHIVELOG mode.

    When you take the database offline in NOARCHIVELOG mode:

    (1) the file is offline

    (2) the RCS in which you took the database offline will be is more to be in the online redo logs

    (3) at this point, you need to perform a media recovery to enable again the file online (ie. restore the database)

    So you can see why you shouldn't do that.

    The DROP Offline command does not actually remove the data file. It removes the control file file details and updates the offline data file. It can be used for purposes of recovery or when you actually plan on deleting data files.

  • How to convert Date months in the database that points to the EBS, DWH not.

    Hi friends,

    We intend to create reports in OBIEE and the Source is EBS. This means that we do not want depends on Datawarehouse and Informatica and OBIApps. Simply create us some reports and that they refer to the EBS database.

    End of test, we took an HR report and it contains under columns:

    Months (Sun)
    Revenue by Division (Fact)
    Average cost per numbers of workforce (Fact)

    In my little survey, we found that the income column is of EBS: GL_BALANCES. And we have configured the base of W_Day_D table in DAC has no column months in EBS (not sure).

    Come to my problem, how can I call the month column in my data base stressed EBS. How to convert the Date months in my database.

    I can deceive me, but someone please look into this... How can I create columns for this exact report of OBI in EBS database instead of DwH.

    Thanks in advance...

    Raghu Jen7782

    Just confused here.

    Hang on, if I get it, you want to create report based on columns of EBS directly then using rt BI applications?

    There is then no question of using the W_DAY_D table then.

    Follow

    As long as you have Date column, you can use DB functions to convert them into months (just use the string SUBSTR to extract the month and the year).
    Create your own query instead of using the tables of BI APPS and try to bring a hybrid product.

    Sorry I'm wrong in the understanding of your needs, if I had properly then do the steps above.

    Mark correct or useful if this can help,

    Kind regards
    Rayan Vieira

  • Essbase excellent supplement disappears from the database

    Hi gurus,
    I have this problem with Essbase Excel add-in.
    When I try to connect to the database, I can see the pop up where I can specify the SERVER and then I can see the list of databases too. However, when I select the database I want to connect to and click OK, the names of all the databases to disappear.
    What could be the problem with that?
    Any suggestions would be helpful.
    Thank you

    Another thing to check is to make sure that you only have one version of the add-in installed. This can cause twisted results.

  • Need to insert test data in all the tables that were present in a schema

    Hello

    I use Oracle 9i.

    10 tables were present in my current schema. All tables are not having all the records.

    I need to insert test data in each table using a single procedure. (the table name is inparameter for the procedure)

    For example, I test_emp, test_sal tables.

    CREATE TABLE test_emp (ename varchar2 (40), number of sal);
    CREATE TABLE test_sal (it NUMBER, rank NUMBER, will designate the NUMBER);

    I need to insert some test data in these tables. I shouldn't use utl_file or sql * loader for this.

    I tried below way.
    -- Incomplete code
    
    CREATE OR REPLACE PROCEDURE test_proc_insertdata(p_table_name IN VARCHAR2) IS
    
    BEGIN
    
      --Selected all the column_names, data_type, data_length into a collection variable from user_tab_columns.
    
      SELECT u.column_name, u.data_type, u.data_length
      --BULK COLLECT INTO l_col_tab
        FROM user_tab_columns u
       WHERE u.table_name = p_table_name;
    
      -- generated the values using below statement
      
        SELECT decode(u.DATA_TYPE,'VARCHAR2',dbms_random.string('A', u.data_length),'NUMBER',TRUNC(dbms_random.value(1, 5000)),'DATE',SYSDATE) val_list
        -- INTO collection varaible
          FROM user_tab_columns u
         WHERE TABLE_NAME = p_table_name;  
       
    
    END;
    I am not able to transmit these values to the collection dynamically to the INSERT statement. I tried many ways, but I am not satisfied with the code I've written.

    Please help me if you know a better idea.



    Thank you
    Suri

    Suri wrote:
    Hello

    I use Oracle 9i.

    10 tables were present in my current schema. All tables are not having all the records.

    I need to insert test data in each table using a single procedure. (the table name is inparameter for the procedure)

    For example, I test_emp, test_sal tables.

    CREATE TABLE test_emp (ename varchar2 (40), number of sal);
    CREATE TABLE test_sal (it NUMBER, rank NUMBER, will designate the NUMBER);

    I need to insert some test data in these tables. I shouldn't use utl_file or sql * loader for this.

    I tried below way.

    -- Incomplete code
    
    CREATE OR REPLACE PROCEDURE test_proc_insertdata(p_table_name IN VARCHAR2) IS
    
    BEGIN
    
    --Selected all the column_names, data_type, data_length into a collection variable from user_tab_columns.
    
    SELECT u.column_name, u.data_type, u.data_length
    --BULK COLLECT INTO l_col_tab
    FROM user_tab_columns u
    WHERE u.table_name = p_table_name;
    
    -- generated the values using below statement
    
    SELECT decode(u.DATA_TYPE,'VARCHAR2',dbms_random.string('A', u.data_length),'NUMBER',TRUNC(dbms_random.value(1, 5000)),'DATE',SYSDATE) val_list
    -- INTO collection varaible
    FROM user_tab_columns u
    WHERE TABLE_NAME = p_table_name;  
    
    END;
    

    I am not able to transmit these values to the collection dynamically to the INSERT statement. I tried many ways, but I am not satisfied with the code I've written.

    Please help me if you know a better idea.

    Thank you
    Suri

    With some effort, you can write dynamic insert queries. Read the data dictionary views ALL_TABLES and ALL_TAB_COLUMNS to get the data you need. You may need to limit the list to the tables you specify to hardcode the names of the tables. You can read the views for the information of table and column that you need generate the insert column orders. It will be a lot of work and it might be easier to simply hardcode values. Dynamic SQL is difficult to debug and work with: (.) Something like this (untested and totally undebugged)

    declare
      cursor v_tab_col(p_table_name) is select * from all_tab_columns where table_name = p_table_name;
      v_text varchar2(32767);
      v_table_name varchar2(30);
    begin
      v_table_name := 'DUAL';
      --chr(10) is a newline for readability when debugging
      v_text := 'insert into '||v_table_name||chr(10)||'(';
      --loop to build column list
      for v_tab_rec in v_tab_col loop
        --add comma if not first item in list
        if v_tab_col%rowcount > 1 then
          v_text := v_text ||',';
        end if;
        v_text := v_text || v_tab_rec.column_name;
      end loop;
      v_text := v_text ||') values ('||
      --loop to build column values
      for v_tab_rec in v_tab_cur loop
        if (v_tab_rec.datatype = 'VARCHAR2') then
          --add comma if not first item in list
          if v_tab_col%rowcount > 1 then
            v_text := v_text ||',';
          end if;
          if v_tab_rec.datatype = 'NUMBER' then
           v_text := v_text || '9';
           elsif v_tab_rec.datatype = 'VARCHAR2' then
             v_text := v_text ||'X';
          end if;
      end loop;
      v_text := v_text || ')';
      execute immediate v_text;
    end;
    

    This code is not effective, but shows how to do what you described. You'll have to code for all data types you need and find a way to take into account the primary/foreign keys, yourself. I leave it to you to find a way to avoid selecting the data twice ;)
    Good luck!

    Published by: riedelme on July 24, 2012 13:58

  • inserting a new record in the database of a form

    Hi friends,

    I'm trying to insert a record into the database via a form I created in Oracle 10 g.
    Using the default menu (DEFAULT & bar SMARTBAR), I should be able to save the record, shouldn't I?

    Is someone can you please help me solve this problem?

    Thank you, sheetal :)

    Check if your code sequence and make like this code example (focused only on the "BOLD" letters, because I think that your specific sequence will not be in order i.e. ALL), you must make your sequence in order with no cycle.

    CREATE the SEQUENCE "YOUR_SEQUENCE_NAME" MINVALUE 1 MAXVALUE 99999 INCREMENT OF 1 START WITH 1 CACHE 20 ORDER NOCYCLE .

    Hope this will help.

    Abbas

  • How can I get the dates retrieved from the database to display in Spanish?

    I'm pulling a date from a MySQL database and need to display in Spanish. If it was in English, these are the two statements, I'd be using:

    #DateFormat (event_date, "mmmm") #.
    #DateFormat (event_date, "mmm d") #.

    I tried to use < cfset SetLocale ("Spanish (Standard) '") > in my Application.cfm, but it doesn't seem to work. I don't really know how it is supposed to be used or even if it would work if I had to use it properly.

    Any help would be appreciated.

    Thank you - CaddyX

    Thank you Paul. Now it works perfectly.


    #LSDateFormat (event_date, "mmmm") #.
    #LSDateFormat (event_date, "mmm d") #.
    ...

  • Moving oracle data file while the database is broken down

    I have a database in montage mode while I restore the last of my data files through rman, which won't be finished for a day and a half, and then there's a mountain of archivelogs to apply. I need to pass the data to another disk files so that I have room to restore this file. I looked around a few instructions, but they are all different. Many of them tell me to stop first of all, the database is not a good option with the restoration goes. More say to use the operating system to copy the file, but a site ignored that. It is even said that I can't log out of my session between saying oracle sql to move the file and open the database. All I get is a list of steps that all take my database work.

    Currently, I copy the file to the new destination of Linux, and I'm confused about what my options are and how to get the data file of movement before Oracle is running out of space for my restoration, without doing anything to make things worse. I guess I can just wait for the copy at the end and then run something like "alter rename file ' / old/my_file.dbf ' to ' / new/my_file.dbf '; If I have to cancel the copy for a reason, it is not a big deal, as long as I don't have the space in time.

    A quick look, it seems that you should be able to move the data file and to a change of name as you have suggested, as long as you are in editing mode. I hope you have good backup (or an easier way to recover) in case it does not work.

    MOS Doc 115424.1 - how to rename or move data files and log files

    HTH
    Srini

  • How to import data in Excel sheet to the database using ADF BC

    Hello

    Can someone help me in suggesting how to import data from excel to database.

    Thank you

    Kunal Sharma

    Hello

    You can use the API to read each line of the file excel with your application and the creation of lines for each line that you read.

    See link

    http://www.codejava.NET/coding/how-to-read-Excel-files-in-Java-using-Apache-POI

  • How to insert an XML document to the database table

    Here's one my XML document example I want to import into database

    Example XML Document
    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < DEPTXML department_id = "10" >
    SALES of < DEPARTMENT_NAME > < / DEPARTMENT_NAME >
    < EMPLIST >
    < EMP_T EMPLOYEE_ID = "30" >
    Scott < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < EMP_T EMPLOYEE_ID = "31" >
    Marie < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < / EMPLIST >
    < / DEPTXML >
    < / ROW >
    < ROW >
    < DEPTXML department_id = "20" >
    < DEPARTMENT_NAME > ACCOUNTING < / DEPARTMENT_NAME >
    < EMPLIST >
    < EMP_T EMPLOYEE_ID = "40" >
    John < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < EMP_T EMPLOYEE_ID = "41" >
    Jerry < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < / EMPLIST >
    < / DEPTXML >
    < / ROW >
    < / LINES >
    ********End***********

    Table in which I want to import this file

    hr_new_emp
    (
    department_id number,
    department_name varchar2 (50).
    Number of employe_id
    last_name varchar2 (50)
    )

    If your XML code is in a file, the easiest is to load as a CLOB in the file (google search will give you lots of results to load a file into a CLOB, so I won't detail it here). Once you have it as a CLOB you can fairly easily convert that XMLTYPE for example

      v_xml := XMLTYPE(v_clob);
    

    (assuming that v_xml is declared as XMLTYPE and v_clob is declared as a CLOB)

    Once you have it as an XMLTYPE that is simple to use XMLTABLE to break the XML into its components using SQL...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select xmltype('
      2  
      3  
      4  
      5  SALES
      6  
      7  
      8  Scott
      9  
     10  
     11  Mary
     12  
     13  
     14  
     15  
     16  
     17  
     18  ACCOUNTING
     19  
     20  
     21  John
     22  
     23  
     24  Jerry
     25  
     26  
     27  
     28  
     29  ') as xml from dual)
     30  --
     31  -- END OF TEST DATA
     32  --
     33  select x.department_id, x.department_name, y.employee_id, y.last_name
     34  from t
     35      ,xmltable('/ROWSET/ROW'
     36                passing t.xml
     37                columns department_id   number       path '/ROW/DEPTXML/@DEPARTMENT_ID'
     38                       ,department_name varchar2(30) path '/ROW/DEPTXML/DEPARTMENT_NAME'
     39                       ,emplist         xmltype      path '/ROW/DEPTXML/EMPLIST'
     40               ) x
     41      ,xmltable('/EMPLIST/EMP_T'
     42                passing x.emplist
     43                columns employee_id     number       path '/EMP_T/@EMPLOYEE_ID'
     44                       ,last_name       varchar2(30) path '/EMP_T/LAST_NAME'
     45*              ) y
    SQL> /
    
    DEPARTMENT_ID DEPARTMENT_NAME                EMPLOYEE_ID LAST_NAME
    ------------- ------------------------------ ----------- ------------------------------
               10 SALES                                   30 Scott
               10 SALES                                   31 Mary
               20 ACCOUNTING                              40 John
               20 ACCOUNTING                              41 Jerry
    

    ... and once you have selected the data as it is quite easy to use an INSERT statement around it to insert data into a table, as in a regular INSERT... Select...

    If you are dealing with large amounts of data or a more complex XML structure, you can consider using an XML schema to shred the data in tables.

    Example here...

    Re: XML processing in oracle file

    And you can also load XML data easily by using the function XDB (WebDAV) to Oracle. Details in the Oracle documentation for that or you could find help in the forum XML DB, which also has a FAQ detailing the different methods how to load XML shred data...

    DB XML FAQ

Maybe you are looking for

  • €100 on my ID apple lost?

    Heey everybody, Today, I put 100 euros on my apple id account, but to use it, I need to check my security questions, but I don't know the answers more... I tried to send an email to reset responses, but electronic mail are not sent. Help please, than

  • Continuous imaging using vision builder

    Hello, I use NI 1744 and want to know how to get and record continuous images using Vision Builder. I am in a position to acquire and maintain a single image but cannot acquire continuous images.Looking forward for your help.

  • Windows Live Calendar to - Do List

    Microsoft Windows 7 book 'Inside Out' (p.262) refers to a list of 'tasks' that can be shared online, I think.  I can't find this option anywhere in my Windows Live Calendar.  Am I missing something? Thank you, Jeff Newburg

  • Why used it let me not take a screenshot on Windows 8?

    :) Thank you guys! :)

  • I can't open Adobe Acrobat Reader DC.

    My when I select the program by using the application icon, a screen appears and says:Adobe Acrobat Reader DC has stopped working.A problem caused the blocking of the program works correctly. Windows will close the program and notify you if a solutio