How to change Bulk Insert statement from MS SQL to Oracle

Hi All,
Good day, I would like to bulk insert the content of a file into Oracle db. May I know how to change the below MS SQL syntax to Oracle syntax?
Statement statement = objConnection.createStatement();
statement.execute("BULK INSERT [TBL_MERCHANT] FROM '" MERCHANT_FILE_DIR "' WITH ( FIELDTERMINATOR = '~~', ROWTERMINATOR = '##' )");
Thanks in advance.
cs.

Oracle SQL Loader utility allows you to insert data from flat file to database tables.
Go to SQL Loader links on following url to learn more on this utility
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96652/toc.htm
Chandar

Similar Messages

  • How to prepare an INSERT statement from the resultset

    Hi Friends ,
    I have to generate CREATE and INSERT statements for the Table already present in the database .
    I can prepare CREATE statement by getting the MetaData from the database . Is it possible to create INSERT statement for the data already present in the database table if so how.
    Thanks ,
    Rajesh Reddy

    You should be able to do something like SELECT * FROM foo WHERE 1 = 2. No rows will be returned. Call ResultSet#getMetaData() to get the meta data for the column names and types. You should then be able to dynamically create your own INSERT statement.
    - Saish

  • How to change the default directory from within SQL*Plus ?

    Hello,
    I want to change the default directory directly from within SQL*Plus to be able to launch my command files with simple instructions like :
    @my_command.sql
    If I haven't launched SQL*Plus from the directory containing the file my_command.sql, how do I change the default directory to the directory of my command files ?
    I've searched through the Oracle documentation, there's no SET DEFAULTDIR or something like that. When I do a SHOW ALL, there's no variable containing the default directory.
    If you have an idea...
    regards,
    Jérôme.

    Hi Jérôme (J鲴me ?),
    You cannot directly do that, but you can use @@ instead of @ to run subscripts in the same directory as the superscript
    # head /tmp/tl30/xxx/[xyz].sql                    
    ==> /tmp/tl30/xxx/x.sql <==
    prompt call y
    @y
    prompt call z
    @@z
    quit
    ==> /tmp/tl30/xxx/y.sql <==
    prompt i am in y
    ==> /tmp/tl30/xxx/z.sql <==
    prompt i am in z
    # pwd                                             
    /root
    # sqlplus -s scott/tiger@lsc62 @/tmp/tl30/xxx/x.sql
    call y
    SP2-0310: Datei "y.sql" konnte nicht geöffnet werden
    call z
    i am in zKind regards
    Laurent Schneider
    OCM DBA

  • How to change Human Task state from "Completed" back to "Assigned"

    I am working with human task through BPEL Worklist API
    There is Human Task with state “completed”. We need to change the state back to “Assigned”
    In other words or get this task with “Assigned” state or get exactly the same task with the same number (that I can use as int parameter in ITaskQueryService.getTaskDetailsByNumber method invocation) .
    Is it possible?
    I tried to use ITaskService methods but without results.
    Thanks.

    Hi ,
    This request sits in table RSBKREQUEST with processing type as 2 in data elements USTATE, TSTATE and this 2 is actually "Processed Successfully" status which is obviously wrong.
    All we need is, ask your basis person to change the status to 3 in both these data elements.Then you can delete the previous bad request . Once the request is deleted, the request status gets updated as "4" in table RSBKREQUEST.
    For manually status change you can use the function  module RSBM_GUI_CHANGE_USTATE
    Hope this helps you...
    Regards,
    Debjani...

  • *Urgent*How to insert data from MS SQL to the table that create at the adobe form?

    Hi,
    I'm using Adobe life cycle designer 8 to do my interactive form. I would like to ask how to insert data from MS SQL to the table that i have created in my adobe interactive form?
    I really need the information ASAP as i need to hand in my project by next week... i really appreciate any one who reply this post.
    Thanks

    Tou need to do a couple of things
    1. On the Essbase server, set up an odbc system connection to your MySQL database
    2. In the load rule , go to the file menu and select open SQL data source and in the data source put in your SQL statement . A couple of hints. Where it says Select, don't put in the word select and where it say from don't put in from. The system adds them for you. The easiest way ti enter a SQL statement is to do it all in the select area So if your SQL would normanlly say select * from mytable just enter the code as * from mytable in the select area
    The click ol/retrieve and enter in your connection info. Itshould bring data back into the load rule. Save the load rule and use it

  • How to change a date value from "java.util.Date" to "java.sql.Date"?

    Hi all,
    How to change a date value from "java.util.Date" to "java.sql.Date"?
    I m still confusing what's the difference between them.....
    thanks
    Regards,
    Kin

    Thanks
    but my sql statement can only accept the format (yyyy-MM-dd)
    such as "select * from xx where somedate = '2004-12-31'
    but when i show it to screen, i want to show it as dd-MM-yyyy
    I m using the following to change the jave.util.Date to str and vice versa. But it cannot shows the dd-MM-yyyy. I tried to change the format from yyyy-MM-dd to dd-MM-yyyy, it shows the wrong date in my application.
         public String date2str(java.util.Date thisdate)     {
              if (thisdate != null)     {
                   java.sql.Date thissDate = new java.sql.Date(thisdate.getTime());
                   return date2str(thissDate);
              }     else     {
                   return "";
         public String date2str(java.sql.Date thisdate)     {
              if (thisdate != null)     {
                   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                   return sdf.format(thisdate);
              }     else     {
                   return "";
         public java.util.Date str2date(String thisdate)     {
              String dateFormat = "yyyy-MM-dd"; // = 1998-12-31
              java.util.Date returndate = null;
              if (thisdate != null)     {
                   SimpleDateFormat dateFormatter = new SimpleDateFormat(dateFormat);
                   try {
                        returndate = dateFormatter.parse(thisdate);
                   } catch (ParseException pe) {
                        System.out.println (pe.getMessage());
              return returndate;
         }

  • ROWCOUNT in BULK Insert Statement

    Hi,
    I'm using in a BULK INSERT statement in a PL/SQL procedure and after execution of the SQL statement,I need to capture the row count.
    Same is the case for UPDATE.
    The Example code is as mentioned below:
    INSERT INTO TBL1
    (SELECT VAL1,VAL2 FROM TBL2)
    No. of rows inserted needs to be retrieved after execution of this SQL.
    Please let me know if there is any way to do it.
    Thanks.

    SQL> create table emp as select * from scott.emp where 1 = 0 ;
    Table created.
    SQL> set serveroutput on
    SQL> begin
      2    insert into emp select * from scott.emp ;
      3    dbms_output.put_line('Count='||SQL%RowCount) ;
      4  end ;
      5  /
    Count=14
    PL/SQL procedure successfully completed.
    SQL>

  • Change base view state from a custom component

    I'm pretty new to flex and I'm having a small issue in change the view state from a component.
    My Application have 2 custom components called userlogin and main menu. In the main application page I have userlogin component in one state and the main menu component in another. I'm trying to change the state if the login in successful from user login to main menu. I have the following function written inside the login component.
    private function IsUserLoggedIn(evt:ResultEvent):void
                    if (evt.result.islogin.toString() == "true")
                        currentState = "MainMenu";
                    else
                        Alert.show("Login failed, please try again.", "Login Failed");
    This code worked when I had all the controls in the main page. But then I created components and included them in to components and now when the login is success, its giving the following error.
    ArgumentError: Undefined state 'MainMenu'.
        at mx.core::UIComponent/getState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UI Component.as:9908]
        at mx.core::UIComponent/findCommonBaseState()[E:\dev\4.0.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9928]
        at mx.core::UIComponent/commitCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\core\UIComponent.as:9750]
        at mx.core::UIComponent/setCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\ core\UIComponent.as:9701]
        at mx.core::UIComponent/set currentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6087 ]
        at components::UserLoginForm/__btnSubmit_click()[C:\Projects\WarrantyAutomation\src\componen ts\UserLoginForm.mxml:60]
    I'm sure this has something to do with accessing the states from a custom component, but I do not know how to change the state to the main menu. Please help me with this. Any help is greatly appriciated.

    Hi dasun1981,
    private function IsUserLoggedIn(evt:ResultEvent):void
                    if (evt.result.islogin.toString() == "true")
                        currentState = "MainMenu";
                    else
                        Alert.show("Login failed, please try again.", "Login Failed");
    If I am right the above function is in your userlogin component and the two components "userlogincomponent" and "maincomponent" are in main application file and the states were also defined in main application file.
    But in the function above the currentState refers to the state of the userlogin component and not the main application ...but the states are defined in main application file...that's the reason why the exception was thrown...
    Instead you replace the line in the above function with the below line:
    Application.application.currentState = "MainMenu";
    Please mark it as answer if it helped you.
    Thanks,
    Bhasker Chari

  • How to Change a Default Value from Drop Down Box displayed in Web Dynpro?

    Hi,
    How to Change a Default Value from 'High' to 'Low'  in a Drop Down Box for RANGE field displayed in Standard Web Dynpro Component.  I saw a Default Value set for a RANGE field  in View Context When I select that field and click on Display. I am seeing Default Value set it to 'HI'. Please let me know how to change from HIgh to Low.
    I appreciate your help!
    Thanks,
    Monica

    hi,
    use the set_attribute( ) method now to set the attribute with a particular key eg HIGH in ur case
    // u can use the code wizard( control +f7) this code will be auto generated when u select the
    //radio button to read the context node
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
      DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
      DATA ls_cn_node TYPE wd_this->element_cn_node.
    * navigate from <CONTEXT> to <CN_NODE> via lead selection
      lo_nd_cn_node = wd_context->get_child_node( name = wd_this->wdctx_cn_node ).
    * get element via lead selection
      lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    * set single attribute
      lo_el_cn_node->set_attribute(
          name =  `ATTribute name.`
          value = 'LOW' ).
    it will solve ur query ..
    also refer to this component
    wdr_test_events -> view dropdownbyidx and dropdownbykey ->method name onactionselect.
    regards,
    amit

  • How to change the Unitprice value from 2 decimals to 3 decimals in script

    Hi Gurus,
    how to change the Unitprice value from two decimals to three decimals for each item level for PO in script.
    Please provide some possible solutions.
    Thanks,
    V.V.

    Hi,
    Check the options available like
    &VAR(.2)&  this will print 2 decimals
    &VAR(.3)&  this will print 3 decimals
    need to change the value for how many decimals you need
    Thanks & Regards
    Sarves Sombhatla

  • How to change destination drive? From C to D?

    How to change destination drive? From C to D?
    Not enough disk space on drive C
    Solved!
    Go to Solution.

    Which device and destination for what ? Is it for the Nokia Store downloads ? If 'Yes'.. Go to Nokia Store in your phone and Log-in ..Then go to Options --> Account --> Settings --> Installation Preferences .. and select the appropriate destination..

  • How to change the file type from IMOVIE PROJECT to other types of file

    how to change the file type from IMOVIE PROJECT to other types of file??
    thank you very much for your help=]

    I am not sure what you mean, but once you make a project. Then go to the share menu and you can export the project to iDVD, itunes, mobileme, quicktime.
    Share export quicktime movie will allow you to export to a variety of codecs. What specific export are you looking to share the movie in? What is the final source that the movie will be displayed?

  • How can I bulk delete songs from the playlist, if original file could not be found.

    I deleted the original files from the Library iTines. The songs are still in the playlist. How can I bulk delete songs from the playlist, if original file could not be found. Thank.

    Take a look at my FindTracks script. Download it and test it out on a few tracks first. Use the No option first time around to manually confirm each path that it wants to fix so you can see how it works. When you're happy it does what you want select a larger group of tracks to process automatically.
    tt2

  • How to change view in iPhone from vertical to horizon and vice versa?

    How to change view in iPhone from vertical to horizon and vice versa?

    Not all applications will go from Portrait to Landscape. Changing just requires you to turn the device. However, if you have the orientation lock activated, then it will not change to landscape. To check, look in the status bar and see if you can see a small lock shaped icon near the battery icon. If you do, then orientation lock is activated. To turn it off, swipe upwards from the bottom of the iPhone screen to bring up Control Center. The orientation lock is the last icon on the top row to the right. Tap on it to turn it off. White is on, black is off.

  • How can I bulk delete contacts from my iPhone 4S? I've imported contacts from gmail and hotmail, many of which I don't need. Deleting them individually will take ages, there must be a quicker way. Also, are my contacts taking up space on my iPhone or

    How can I bulk delete contacts from my iPhone 4S? I've imported them from gmail and hotmail and there are many more than I need. Deleting them one by one will take ages, there must be a quicker way! Also, do contacts take up space on the phone or are they stored remotely?
    Thanks.. J

    You should be syncing your contacts with an app on your computer or cloud service (iCloud, Gmail, Yahoo, etc), and not relying on a backup.  If you haven't been doing this, start now and then restore your old backup.  You will then be able to sync the new contacts back into the phone.  However, you will lose all messages, etc newer thant the backup.

Maybe you are looking for