Using Accept & Prompt to insert data

I am trying to insert data into a table with the accept & prompt statements. My problem is entering more than 1 record using a loop or while statement. How can I continue entering data until I want to stop. The ACCEPT & PROMPT statements are before BEGIN, but the loop does not go back to the top. It just loops inside.

If I understood it right, you can have a accept and prompt before the loop and again as the last statement in the loop.
Regards.
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by charles ([email protected]):
I am trying to insert data into a table with the accept & prompt statements. My problem is entering more than 1 record using a loop or while statement. How can I continue entering data until I want to stop. The ACCEPT & PROMPT statements are before BEGIN, but the loop does not go back to the top. It just loops inside.<HR></BLOCKQUOTE>
null

Similar Messages

  • Using SQL Loader to insert data based on conditionally statements

    I would like to use sql loader to insert records from a single text file into an Oracle database table. Sounds easy but the problem is that I need to check the existence of data in another table (Table A) before data can be loaded into Table B.
    Table A has two columns: dept_no (primary key value) and dept_name (char)
    Table B has five columns: emp_no (primary key value), dept_no (foreign key value to Table A), employee (char), job_title (char) and salary (number)
    Text File looks like this:
    Finance Jones President 10000
    HR Smith Admin 2000
    HelpDesk Jenkins Technician 3000
    Problem:
    1. I need sql loader to insert records into Table B by first checking if the first field in the file is in Table A.
    2. If value exists get it's dept_no value.
    3. If value doesn't exist discard record ( I might want to have sql loader insert a new record for this into Table A)
    4. Using value from #2, insert the value in Table B for dept_no column.
    5. Also assign a sequence value for the emp_no value in Table B.
    Any guidance is greatly appreciated.
    Thanks,

    Hello,
    I am not sure this is possible with SQL loader. I would rather use an external table based on your file.
    Then, I would use SQL to load your data into your table, based on your conditions.
    Your request is not very complicated, writing the SQL to do that will be really more simple than trying to do it with SQL loader.
    Hope it will help.
    Regards,
    Sylvie

  • How to use record type for inserting data into a table

    I've read through the web the following tip:
    "When working with a large number of columns, using variables of type RECORD is a better approach. With this approach, you do not have to list anything in the INSERT statement, because you are inserting a variable into the table that is defined as a row from the same table."
    I usually define a variable as
    r_mytable     mytable%ROWTYPE;
    and inside my procedure I'll set the fields I need as
    r_mytable.field1 := 1;
    r_mytable.field3 := 7;
    and then I perform the insert as
    insert into mytable
    (field1,
    field3)
    values
    (r_mytable.field1,
    r_mytable.field3);
    According to the tip I've copied above, how can I use the TYPE RECORD of pl/sql for achieving the same result but perhaps in a smarter way?
    Thanks in advance!

    Hi,
    Are you looking for this?
    SQL> create table table1 (id number, descr varchar2(30));
    Table created
    SQL>
    SQL> DECLARE
      2   my_rec table1%rowtype;
      3  BEGIN
      4   my_rec.id := 1;
      5   my_rec.descr := 'TEST';
      6   insert into table1 values my_rec;
      7  END;
      8  /
    PL/SQL procedure successfully completed
    SQL> select * from table1;
       ID DESCR
        1 TESTWorks with UPDATE too :
    SQL> DECLARE
      2   my_rec table1%rowtype;
      3  BEGIN
      4   my_rec.id := 2;
      5   my_rec.descr := 'TEST2';
      6   update table1 set row = my_rec where id = 1;
      7  END;
      8  /
    PL/SQL procedure successfully completed
    SQL> select * from table1;
       ID DESCR
        2 TEST2

  • Is it possible to insert data into two Excel worksheets using Report Generation Toolkit?

    I'm using the toolkit to insert data into two separate worksheets in Excel using named cells. The problem is that it tends to favor one sheet or the other. In other words, one sheet will have data and the other no data and vice versa. (Sometimes I get data in both sheets.) Is there something I can do to clear this up or is what I'm trying to do unreasonable? I would like to use two worksheets so one sheet receives text and data. The other sheet is used to format the data into a printable report. (i.e. using Excel's CONCATENATE function) The second (report) sheet is also used to receive plots (JPEG files) from LabVIEW. I'd send the plot images to the first sheet, but I can
    not see a way to automatically transfer images from sheet to sheet. I'm using LV 7.1, Win2000 and Toolkit v.1.0.1

    Hi,
    You can use the "Excel Get Worksheet.vi" under All Functions >> Report Generation >> Excel Specific >> Excel General to specify a particular worksheet as the current worksheet. Then, you can specify which worksheet you want to write to in your VI.
    Let me know if you have any further questions and good luck!
    Kileen C.
    NI

  • Could not insert Data in to the table

    hello friends
    I have some pbm in inserting values in to sqlserver database table.I could not insert values to the
    table having varchar datatype fields.partyType is a field name of varchar type.when i try to insert
    "LCL" for that field it throws following exception.
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]The name 'LCL'
    is not permitted in this context. Only constants, expressions, or variables allowed here. Column
    names are not permitted.
    sometime it throws
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not
    implemented
    If i give only numeric values to those fields it accepts.ie table accepts only integer values for all the fields.I use prepared statement for inserting data.I am inserting data to 4 tables at a time.I use ODBC driver.can u tell me where would be the problem??</p>
    with regards
    devi

    Hmmmm...
    ssniazi does nothing but ask for contact information or recommend Oracle products.
    Based on this I consider it likely that this person is some sort of sales representative either directly or indirectly associated with Oracle.
    I personally wouldn't provide any contact information to this person. Nor would I accept any advice until this person starts to actually provide some solutions or at least correctly reveals any financial interests that they might have.
    In addition I believe ssniazi is in violation of the conduct code of this website because ssniazi is requesting information which will be used by a business entity without telling the users that it will be used in that way. And I expect that Oracle itself would frown on such activities.
    2.3 You agree that You will not use the Website to:...(g) collect or store personal data about other users unless specifically authorized by such users.

  • How can i insert data into DB from my page programatically in Oracle ADF..?

    Hai, this is praveen.
    I have created  an EO and VO, when i have inserted data by dragging and dropping from DataControl -->Operations-->Create. I have successfully inserting data. But how can i do it programatically. What are the pre-defined steps that i can use over there to insert data into table programatically. Could u plz help me?

    Hi,
    You have to create an action Listener in the bean for any button.
    Then call an AM method.
    In that you have to do the following
    ViewObject yourVO = getYourVO();
    Row r = yourVo.createRow();
    r.setAttribute("Column1", value1); //the name of column should be as it is in your vo attribute.
    yourVO.insertRow(r);
    this.getDbTransaction().commit();
    Thanks

  • Create a trigger to check inserted date is before or after SYSDATE

    Hi,
    I am trying to create a trigger that will check an inserted date against SYSDATE and alter the value (i.e. make it SYSDATE) when the entered date is incorrect.
    For example, I have a Customer table with a record named MemberDate which, when a date is entered to it, will be checked by the trigger to ensure it is not before the current date.
    My code so far;
    CREATE OR REPLACE TRIGGER Customer
    BEFORE INSERT ON
    Customer
    FOR EACH ROW
    DECLARE
    e_invaliddate_ud EXCEPTION;
    BEGIN
    IF :NEW.MemberDate < SYSDATE THEN
    RAISE e_invaliddate_ud;
    END IF;
    EXCEPTION
    WHEN e_invaliddate_ud THEN
    DBMS_OUTPUT.PUT_LINE('The date entered for MemberDate is invalid. The
    MemberDate has been set to the current date');
    END;
    So far, this trigger only returns an error message but allows the date to be entered even if it is incorrect. I have tried a few ways of altering the entered date to SYSDATE but to no avail.
    I am running scripts using SQL PLUS and inserting data using
    INSERT INTO Customer
    VALUES(CustomerID, ..., MemberDate);
    Where the values entered will be checked to ensure the MemberDate is not before SYSDATE.
    The MemberDate data-type is DATE and has a rule that it must not be before the current date. I am aware that a constraint may not be used to perform a check using SYSDATE, this is why I am trying to make a trigger.
    However, my knowledge of triggers is limited
    If anyone can help, I will be very Happy.
    Thank you in advance.

    Use this if you want an error message that halts the execution:
    create or replace trigger customer
    before insert on customer
    for each row
    begin
      if :new.memberdate < sysdate
      then
        raise_application_error(-20000,'The date entered for MemberDate is invalid.');
      end if;
    end;Use this if you want to automatically to overwrite the MemberDate with sysdate without an error message:
    create or replace trigger customer
    before insert on customer
    for each row
    begin
      :new.memberdate := greatest(sysdate,:new.memberdate);
    end;Note: untested
    Regards,
    Rob.

  • Efficient Technique to Insert Data in Table ???

    Hi
    I want to implement the best efficient technique to insert data in Table. I have rows counts in millions in one db and I want to insert them in to another db with least time.
    >>
    I am implementing the technique of reading data from first db, apply some logics on it, insert the data in the log file (log4j) in the tab and line separated format and after completing the process insert log file data into the final table (using mysql load data local infile).
    >>
    Another technique that I use is to directly insert data into the final table after reading it from first db and applying logics on it.
    >>
    Another technique that I am going to use is using the JDBC Batch Update i.e. updating around (say 1000) rows in a final table after reading and applying logics on it.
    Bench Marks:
    The first technique takes 2 minutes for 60,000 rows
    The second technique takes 4.5 minutes for 60,000 rows
    The third technique is not implemented yet
    Do anyone have any other technique to implement this working in more efficient way?
    Regards
    Rizwan Ahmed (rizzz86)

    When optimizing JDBC code, there are several things you should look into:
    * use batch statements (reducing the number of roundtrips is really important!)
    * disable autoCommit and commit() on your own (reducing the number of roundtrips and the number of disk accesses on the DB server)
    * use PreparedStatements (avoid parsing the same statement again and again)
    Those three should buy you quite a bit of time.
    Edit: if it's still too slow (and only then!) you can look at the documentation of your JDBC driver. Sometimes there are options that can be enabled to speed things up (MySQL is especially bad here: there are some advanced features that are disabled by default, just because older server releases don't support them. I don't understand why they arent enabled conditionaly.).

  • Calling webservice in udf for inserting data into webservice

    Dear Experts,
          Please give me the drawbacks of using lookup function for inserting data. we are calling a webservice from the udf for inserting the data using a webservice.
    It is a file to jdbc usnig a soap lookup . we use this approach because we need to pass the response from webservice along with the error data to the jdbc.   is there any other way to do it without using bpm ?
        In the udf we are creating the xml structure for webservice and passing the parameters through arguments.
    is there a better approach for this ?
    Thanks,
    Aju

    Hi Aju,
    You can do it without BPM.
    Write UDF for Soap Lookup. Parse the response message from Webservice.  and map the required values to respective fields.
    See the weblog
    Webservice Calls From a User Defined Function.
    Negative point of this solution is that it will take some time to call Webservice and get response back from it.
    Kulwinder

  • DB Adapters inserting data into 2 diff tables of same database giving issue

    Hello,
    I am using Oracle soa suite 11g BPEL.
    I need to insert data in 4 different tables of same Oracle database with the requirement of rollback all data if error occurs anywhere.
    I have configured the DB adapater as XA enabled on console .
    In code:-
    I am using 2 DBAdapters to insert data one by one in 2 diff tables of same DB (using INSERT ONLY operations). Before each invoke activity i am using a transformation activity to prepare the input variable of the DBAdapter.
    When i run this code i get below error:-
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [DBINS_DIANA.XxontPoiHdrsIface]. Caused by java.sql.BatchUpdateException: ORA-02049: timeout: distributed transaction waiting for lock . ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary>
    If i use a wait activity between the 2 invokes i get the data inserted fine , but that means the transactions between inserts would be committed which i want to be rollback fully in case of any errors.
    Can anyone have a clue what is wrong here?
    Thanks
    Shivani

    Hi Anagha,
    Have a look at these links:
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2b/d5653fd1d3b81ae10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/95/bb623c6369f454e10000000a114084/frameset.htm
    Regards,
    Chandra

  • Insert data with collection data

    Hi,
    I am using a loop for inserting data into a table but it doesn't work.
    On a form you can insert data for the items (text field). These data were stored in the collection 'COLLECTION_C1_T20':
    if :P103_SEQNR is null then
    apex_collection.add_member(
    p_collection_name =>'COLLECTION_C1_T20',
    p_c001 =>:P103_C1,
    p_c002 =>:P103_C2,
    p_c003 =>:P103_C3,
    p_c004 =>:P103_C4,
    p_c005 =>:P103_C5,
    p_c006 =>:P103_C6,
    p_c007 =>:P103_C7,
    p_c008 =>:P103_C8,
    p_c009 =>:P103_C9,
    else
    apex_collection.update_member(
    p_collection_name =>'COLLECTION_C1_T20',
    p_seq =>:P103_SEQNR,
    p_c001 =>:P103_C1,
    p_c002 =>:P103_C2,
    p_c003 =>:P103_C3,
    p_c004 =>:P103_C4,
    p_c005 =>:P103_C5,
    p_c006 =>:P103_C6,
    p_c007 =>:P103_C7,
    p_c008 =>:P103_C8,
    p_c009 =>:P103_C9,
    end if;
    I have tried to concatenate the members C001, C002, ... of the collection with the counter v_count but an error is shown when I want to store the records into the table:
    ORA-06550: line 124, column 9: PL/SQL: ORA-00904: "C00": invalid identifier ORA-06550: line 103, column 1: PL/SQL: SQL Statement ignored
    The source code looks like this one:
    for v_count in 1 .. 9
    loop
    insert into L01_RESULTS (TEST_RESULT)
    values
       (select c00||v_count
        from apex_collections
        where collection_name = 'COLLECTION_C1_T20'
        and seq_id =
                   select max(seq_id)
                   from apex_collections
                   where collection_name='COLLECTION_C1_T20')
    end loop;
    end;Any a idea how to manage this?
    cheers,
    ben

    Mike,
    it is a form (wizard) to store about 200 data. This is managed by clicking a button (FINISH).
    I have about 10 processes to store the data and for testing I have decreased them to two processes. (8 processes are now executed when the button CANCEL is clicked and the other two are executed when the button FINISH is clicked.) So the process is executed by clicking the button.
    I post the source code because it is possible that I made a mistake witch I couldn't figure out:
    declare
    order_number_value                VARCHAR2(30);
    analyses_date_value               DATE;
    analytical_method_value           VARCHAR2(20);
    analyte_measured_value            VARCHAR2(40);
    analyst_name_value                VARCHAR2(20);
    valid_identifier_value            VARCHAR2(50);
    v_sql                             varchar2(4000);
    W_test_result                     varchar2(100);
    readout_value                     varchar2(400);
    begin
    readout_value := 'SIG_NUM_CEN_CELL_';
    for v_count in 1 .. 9
    loop
    v_sql:='select c00'||v_count||'
    from apex_collections
    where collection_name = ''COLLECTION_C1_T20''
    and seq_id = (select max(seq_id) from apex_collections
    where collection_name=''COLLECTION_C1_T20'')';
    execute immediate v_sql into W_test_result;
    insert into L01_RESULTS (READOUT, TEST_RESULT)
    values (readout_value||v_count,W_test_result);
    -- commit;
    end loop;
    end;ben

  • Insert data into multiple entities at once using a view object

    Hi,
    I'm trying to insert data into multiple entities at once using a view object, but unfortunately it doesn't seem to work. The two entities have a 1:1 association. I created a view object which contains both entities and I made sure they aren't read-only. But like I said it doesn't work, I can't insert data in both entities at once... :(
    Is this possible? And how (if it is)?

    Hi,
    I'm trying to insert data into multiple entities at once using a view object, but unfortunately it doesn't seem to work. The two entities have a 1:1 association. I created a view object which contains both entities and I made sure they aren't read-only. But like I said it doesn't work, I can't insert data in both entities at once... :(
    Is this possible? And how (if it is)? Peter:
    This is definitely supported and tested. Please send us the exception stack trace. You must running into other problems. A few things to note:
    A) You have to mark the entities as both updateable (not read-only) and not reference-only.
    B) If you're not seeing an exception stack, turn on diagnostic. Here is how:
    To turn on diagnostic, go to the IDE,
    1. Select the project.
    2. Do right mouse click and select "Project Settings..."
    3. On the Settings dialog, select Configurations/Runner.
    4. In the righthand side pane, you should see a textbox for "Java
    Options". Please add the following JVM switch:
    -Djbo.debugoutput=console
    Then, rerun. The run command should include
    -Djbo.debugoutput=console as in
    "D:\JDev9i\jdk\bin\javaw.exe" -Djbo.debugoutput=console -classpath ...
    You should now see a lot more output on the IDE's message window. Here you should see the exception stack trace.
    If you invoking your app directly from command prompt, just add "-Djbo.debugoutput=console" after your "java.exe".
    Thanks.
    Sung

  • Inserting data using stored procedure

    Using SQL Server Express 2014, I'm creating a stored procedure to accept parameters and convert data from a staging table to a production table. The parameters specify the table names and a field to lookup in another table. This is the first stored procedure
    I've tried to create by myself though and I'm basing it on a guide. Here's what I've got so far:
    CREATE PROCEDURE [dbo].[stp_UpdateAggregatePerf]
    @prod_tbl NVARCHAR(250), @stg_tbl NVARCHAR(250), @customer NVARCHAR(20)
    AS
    BEGIN
    DECLARE @p NVARCHAR(250), @s NVARCHAR(250), @c NVARCHAR(20), @cid int, @sql NVARCHAR(MAX)
    SET @p = @prod_tbl
    SET @s = @stg_tbl
    SET @c = @customer
    SET @cid = 'SELECT [dbo].[Customers].[CustomerID]
    FROM dbo.customers
    WHERE [dbo].[Customers].[CustomerName] LIKE ' + @c
    SET @sql = 'INSERT INTO ' + @prod_tbl + '
    SELECT CONVERT (datetime,TimeIndex,103) AS TimeIndex,
    CONVERT(decimal(10,3),user_reads,3) AS Reads,
    CONVERT(decimal(10,3), user_writes,3) AS Writes,
    CONVERT(decimal,10,3),total_transfers,3) AS Total,
    CONVERT(decimal(10,3),cp_reads,3) AS CPReads,
    SUBSTRING(AggregateName,1,25),
    SUBSTRING(ControllerName,1,25),
    SUBSTRING(@cid,1,25)
    FROM' + @stg_tbl
    EXEC sp_executesql @sql
    SET @sql = 'DROP TABLE' + @stg_tbl
    EXEC sp_executesql @sql
    END
    So it should accept the parameters, take the customer name parameter and look up the customer ID field from another table to use in the last column, then generate and run the INSERT INTO statement to convert and transfer data, then drop the staging table.
    I'm not sure how to go about using the INSERT statement with variables though, or even if I'm concatenating the string together correctly.
    Here's my CREATE statements for the tables:
    prod table:
    CREATE TABLE [dbo].[AggregatePerf](
    [AggrPerfID] [int] IDENTITY(1,1) NOT NULL,
    [AggregateName] [varchar](25) NOT NULL,
    [TimeIndex] [datetime] NOT NULL,
    [Reads] [decimal](10, 3) NOT NULL,
    [Writes] [decimal](10, 3) NOT NULL,
    [Total] [decimal](10, 3) NOT NULL,
    [CPReads] [decimal](10, 3) NOT NULL,
    [ControllerName] [varchar](25) NOT NULL,
    [CustomerID] [varchar](10) NOT NULL,
    CONSTRAINT [PK_AggregatePerf] PRIMARY KEY CLUSTERED
    [AggrPerfID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    Staging:
    CREATE TABLE [dbo].[$tablename] (
    [TimeIndex] VARCHAR(100)
    , [user_reads] VARCHAR(100)
    , [user_writes] VARCHAR(100)
    , [cp_reads] VARCHAR(100)
    , [total_transfers] VARCHAR(100)
    , [AggregateName] VARCHAR(100)
    , [ControllerName] VARCHAR(100)
    The staging table is generated from PowerShell to import CSVs but I'm past that stage of the project now. I hope you can help  me get an understanding here as once I wrap my around one table I can apply the same technique to others.
    Thanks in advance
    Adam

    Why do you provide a tables as a parameters? I think you may avoid using dynamic sql and simple use a static one.
    Where do you use @cid
    variable?
    Static SQL may look like
    SELECT @cid=
    [dbo].[Customers].[CustomerID]
    FROM dbo.customers
    WHERE [dbo].[Customers].[CustomerName] LIKE '%'+@c+'%'
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Error while insert data using execute immediate in dynamic table in oracle

    Error while insert data using execute immediate in dynamic table created in oracle 11g .
    first the dynamic nested table (op_sample) was created using the executed immediate...
    object is
    CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
    mark1 number,
    mark2 number
    t_sub_mark is a class of type sub_mark
    CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
    create table sam1(id number,name varchar2(30));
    nested table is created below:
    begin
    EXECUTE IMMEDIATE ' create table '||op_sample||'
    (id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
    end;
    now data from sam1 table and object (subject_obj) are inserted into the dynamic table
    declare
    subject_obj t_sub_mark;
    begin
    subject_obj:= t_sub_mark();
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
    end;
    and got the below error:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7
    then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
    execute immediate 'insert into '||dynam_table ||'
    (SELECT

    887684 wrote:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
    If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically.

  • Cannot insert data from local database into remote database using subquery

    I have two oracle databases on different host.
    One is version 8i in Host A and the other is 9i in Host B.
    First, I try to create a dblink in 8i to 9i, but it fail.
    Then, I create a dblink in 9i to 8i, it success.
    I have already tried some select statement in 9i to view the table in 8i, which is success and that means the dblink is really work.
    The sql statement is like
    Select * from table1@hostA
    Then I have tried running some INSERT statement in 9i, which is copy data from table 1 in 8i to table 2 in 8i, both tables are in 8i. The sql statement is like
    Insert INTO table2@hostA(field1, field2)
    select field1, field2
    from table1@hostA
    This also success.
    Also, I have tried to use the following INSERT statement
    Insert INTO table2@hostA(field1, field2) values ('XXX', 'XXX)
    This also success.
    However, when I try to insert data from table in 9i to table in 8i using the following INSERT statement, it failed.
    Insert INTO table2@hostA(field1, field2)
    select field1, field2
    from table1
    The statement can execute, but all the rows inserted with every field value equal to NULL. I have tried to run the select part, it can return the data. But when I run the INSERT statement above, the value inserted into table2 is all equal to NULL.
    One more thing, I discover that the databases are using different NLS_CHARACTERSET
    9i is AL32UTF8
    8i is WE8ISO8859P1
    Is this relevant to my problem?
    Does anyone know the solution about this problem?
    Thanks!!

    How is the best way to do this ?How much are you planning to send?
    You can use COPY command. Ensure that you have valid database link between two databases.
    Available options are:
    create - creates a new table. errors out if the destination table exists.
    replace - drop the destination table and re-creates with data.
    insert - inserts data if the destination table exists.
    append– appends data into an existing table.
    use set arraysize 5000 -The arraysize specifies the number of rows that SQL*Plus will retrieve from the database at one time.
    copy from scott/tiger@ORCL to scott/tiger@ORCL92 create new_emp using select * from emp;

Maybe you are looking for

  • Controversy in two ResultSet!!!

    Could anyone please provide me a solution for this problem.. I've created two ResultSet rs1 and rs2, both are retrieving the data from the same table. Manipulation of rs2 or any kind of processing should affect the rs1. So, if i updating something in

  • How to check mass change(vendor) done by any particular user .

    Hi, What is a transaction used  to check mass change(vendor) done by any particular user . Thanks, Dharmesh

  • Application specific key-value pairs in jndi.properties

    Hello, Can I specify my application specific key-value pair in jndi.properties? I tried something like this java.naming.factory.initial=.jndi.WLInitialContextFactory java.naming.provider.url=t3://localhost:7001 myVar=myVal When i tried looking up "my

  • RF Scanner Introduction/ Implementation

    Hi Please explain the procedured invloved in a RF scanner implementation in a Warehouse. I assume the areas involved are. 1) IMG Mobile config 2) SAP Console setting 3) RF Device to SAP Console communication. Plse give as much information as possible

  • Generic table updation

    Hi All,     I have a requirement as follows. when a user enters any table on selection screen (standard , custom table etc) the tabel contenets shud be displayed in an ALV grid... it also has to be editable and the changes shud be updated in the tabl