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;

Similar Messages

  • Inserting data from one table into another table using PL/SQL

    HI,
    I am trying to insert values from one table into another using PL procedure, the values I want to retrieve from the table riverside1 are charac_id and charac_type and insert these values into another table called riverside2 , the stored procedure zorgs_gorfs(x,y) accepts two parameters which are 2 charac_id's of d characters in riverside1 then using insert statements inserts these characters from riverside1 into riverside2.
    CREATE OR REPLACE PROCEDURE zorgs_gorfs(x IN NUMBER, y IN NUMBER) AS
         BEGIN
              INSERT INTO riverside2
                   (charac_id)
              VALUES
                   (x);
    INSERT INTO riverside2
                   (charac_id)
              VALUES
                   (y);
          END zorgs_gorfs;
    /This works but the problem im having is that when I also try to insert the charac_type as well as the charac_id it doesnt work below is the code:
    CREATE OR REPLACE PROCEDURE zorgs_gorfs(x IN NUMBER, y IN NUMBER) AS
         BEGIN
              INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id = x);
          END zorgs_gorfs;
    /can someone kindly sort me out

    modify this sql
    INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id = x);as
    INSERT INTO riverside2
                   (charac_id,charac_tye)
              VALUES
                   (Select
                        charac_id,
                        charc_type
                   FROM
                        riverside1
                   WHERE
                        charac_id in ( x,y));But my suggestion would be consider revising your approach. It does not look that good.
    Thanks,
    karthick.

  • How to insert data from *.dmp file to  oracle 11g using Oracle SQL Develope

    hi
    i backup my database using PL/SQL developer and made *.dmp file
    how to insert data from *.dmp file to oracle 11g using Oracle SQL Developer 2.1.1.64
    and how to make *.dmp file from sql*plus ?
    thanks in advance

    Pl/Sql developer has a config window, there you choose the exec to do the import/export.
    Find it and his home version, it may be exp or expdp, the home version is the version of the client where the exp executable is.
    Then use the same version of imp or impdp to execute the import, you do not need to use Oracle SQL Developer 2.1.1.64. If you want to use it, you must have the same version in the oracle home that exp/imp of sql developer use.

  • How is the best way to send data from local database into remote database ?

    Hi all,
    I need to send data from local Oracle database into remote oracle database. Both sites connected via 128 kbps frame relay connection.
    The sending need to be done once a week, can be done nightly.
    How is the best way to do this ?
    Thank you very much,
    xtanto

    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;

  • Inserting date from a jsp into sql server 2005 database

    Dear Friends.,
    i have a jsp page, in that there is a form with various user input fields. in that one field is date field. i tried to insert the date field into the sql server 2005 database. but it is not getting inserted into the database.
    when i tried by inserting one field to database, it is getting inserted. for all the fields its works fine, except the date field.
    i need hint or code to insert the date get from the jsp page to database.
    i am using a servlet to do all database related things. i.e making connections, executing prepared statement queries
    thanks
    sekar.

    The variable needs to be outside of the string to be recognized as a variable. You need to remove the variable from the string, then concatinate it onto the string (and concatinate any remaining string parts - the closing paren). For example:
    stmt.executeUpdate("INSERT INTO table VALUES ('test', " + companyID + ")");
    Hope that's clear enough and helps. Good luck on your thesis!
    jim

  • Periodic Importing of data from SQL Server into Oracle Database

    I would like to know how I can use the SQL Developer tool to import data from a SQL Server database across the internet into an Oracle Database on a periodic basis? I understand there is a Migration Workbench, but it seems to be only a one off activity.
    What I would really like is to be able to import data for example, very 30 minutes from multiple tables/views in a SQL Server Database into an Oracle Database (overwriting or modifying existing same data) without the need for Heterogeneous Connectivity, as my Oracle Database is not my LAN.
    Thank you for your kind ideas and suggestions.

    To be honest the best way to do it is DG4ODBC or DG4MSQL. All other solutions need manual interaction.
    The gateways DG4ODBC and DG4MSQL are independant from the Oracle database and also from the SQL Server location. In a worst case scenario you have an Oracle database on machine A, the gateway on machine B and the SQL Server on machine C.
    Gateways were built to exactly do what you want. As you have access to the Oracle database the only part you need to define within the Oracle database is a db link. If you specify the full tns connect identifier there is even no need to edit the tnsnames.ora file.
    Even if you excluded the gateway in your last sentence the best solution would be the gateway.
    Another option you can use is the SQL Server linked server mechanism. It allows you to link another server using OLEDB driver. In your case you can then link the Oracle db into your SQL Server and then insert/update/delete and select Oracle tables from the SQL Server. Using now a trigger will replicate the data immediately to the Oracle db.

  • Insert date from YUI calendar into mysql table

    Is there a way to insert the date selected from the YUI calendar into a mysql table?

    I have been in trouble since last 2 days... I have tried all possible and explored any related topics.. Still I cannot address the problem.
    Problem 1:
    I have a simple jsp form which passed a bengali word.
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <form action="Test2.jsp" method="post" >
    <input type="text" value="&#2453;&#2494;&#2453;&#2494;" name="word">
    <input type="submit" value="Next">
    </form>
    </body>
    </html>
    When this page is post, a java program( TestWord) is called by the Test2.jsp. TestWord insert the passed bengali word into a MySQL table. Then it retrieves again the inserted bengali word and display in Test2.jsp.
    Test2.jsp:----
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <jsp:useBean id="get2" class="dictionary.TestWord" scope="session"/>
    <jsp:setProperty name="get2" property="*"/>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <form action="" method="post">
    <%
    String s=get2.getWord();
    out.write("Before converion onversion = "+s);
    s = new String(s.getBytes("ISO-8859-1"),"UTF-8");
    out.write(" After conversion = "+s);
    %>
    </form>
    </body>
    </html>
    It gives the output something like:
    Before conversion = &#65533;?&#2494;&#65533;?&#2494; After conversion = ??????
    Problem 2:
    The record in mysql table is inserted in bengali font (eg. &#2453;&#2494;&#2453;&#2494;). When I retrieve the record and display in a jsp page, I can see the bengali word (&#2453;&#2494;&#2453;&#2494;) properly. But if I insert the bengali word again in MySql table, then I see some string like "&#65533;?&#2494;&#65533;?&#2494;" storing in the table.
    Please help me out..
    Thanks in advance.

  • Insert data from two rows into a single row in a new table

    Hi
    i have a table like the following
    Deptno Dname      Salary
    10     Computer     2000
    10     Computer     4000
    10     Computer     3000
    10     Science     6000
    10     Science 1000
    10     Science     4000
    10     Science     10000
    I want to insert data into a new table like the following
    Deptno MaxSalCom     Minsalcom MinSalSci     MaxSaSci
    10     2000     4000      1000     10000
    Deptno--As in Table1
    MaxSalCom--Maximum salary for Dname " Computer"
    Minsalcom--Minimum salary for Dname " Computer"
    MaxSalSci--Maximum salary for Dname " Science"
    MinsalSci--Minimum salary for Dname " Science"
    Please help me how to go about it

    with data as
    (select 10 dno, 'Computer' dname, 2000 sal FROM dual
    union all
    select 10, 'Computer', 4000 FROM dual
    union all
    select 10, 'Computer', 3000 FROM dual
    UNION all
    select 10, 'Science', 6000 FROM dual
    union all
    select 10, 'Science', 1000 FROM dual
    union all
    select 10, 'Science', 4000 FROM dual
    union all
    select 10, 'Science', 10000 FROM dual
    select dno, min(decode(dname,'Computer',sal)) min_sal_comp , max(decode(dname,'Computer',sal)) max_sal_comp,
    min(decode(dname,'Science',sal))min_sal_sci , max(decode(dname,'Science',sal)) max_sal_sci
    from data
    group by dno;

  • Insert data from a table into 5 different tables

    My application has a data block than display information from another table. From this data block, the user has the option to select the records for upload. The information in the data block is used to insert data into 5 different tables. So if any exception occurs while inserting, the whole process should be rollback, but before this happen a record is inserting in a failed table indicated the reason of the failed.
    For this process I use the following commands:
    1.     sp_name := Get_Application_Property(SAVEPOINT_NAME);
    2.     INSERT DDL
    3.     INSERT DDL
    4.     INSERT DDL
    5.     INSERT DDL
    6.     INSERT DDL
    7.     If Other Exception then ISSUE_ROLLBACK(sp_name) Otherwise FORMS_DDL ('commit')
    The problem the previous insert(s) rollback
    Thanks,

    Hi,
    If you are using FORMS_DDL built-in to insert the data, then after each FORMS_DDL statement, you have to check the values of FORM_SUCCESS or FORM_FAILURE built-ins.
    FORMS_DDL('<insert_statement_1>');
    IF FORM_FAILURE THEN
    <the statement fails. so have to be rollbacked>
    END IF;
    FORMS_DDL('<insert_statement_2>');
    IF FORM_FAILURE THEN
    <the statement fails. so have to be rollbacked>
    END IF;Hope this helps.
    Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • How to insert data from APEX form into two tables

    Hi,
    I'm running APEX 4.1 with Oracle XE 11g, having two tables CERTIFICATES and USER_FILES. Some of the (useless) fields are cut to reduce information:
    CREATE TABLE CERTIFICATES
    CERT_ID NUMBER NOT NULL ,
    CERT_OWNER NUMBER NOT NULL ,
    CERT_VENDOR NUMBER NOT NULL ,
    CERT_NAME VARCHAR2 (128) ,
    CERT_FILE NUMBER NOT NULL ,
    ) TABLESPACE CP_DATA
    LOGGING;
    ALTER TABLE CERTIFICATES
    ADD CONSTRAINT CERTIFICATES_PK PRIMARY KEY ( CERT_ID ) ;
    CREATE TABLE USER_FILES
    FILE_ID NUMBER NOT NULL ,
    FILENAME VARCHAR2 (128) ,
    BLOB_CONTENT BLOB ,
    MIMETYPE VARCHAR2 (32) ,
    LAST_UPDATE_DATE DATE
    ) TABLESPACE CP_FILES
    LOGGING
    LOB ( BLOB_CONTENT ) STORE AS SECUREFILE
    TABLESPACE CP_FILES
    STORAGE (
    PCTINCREASE 0
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    FREELISTS 1
    BUFFER_POOL DEFAULT
    RETENTION
    ENABLE STORAGE IN ROW
    NOCACHE
    ALTER TABLE USER_FILES
    ADD CONSTRAINT CERT_FILES_PK PRIMARY KEY ( FILE_ID ) ;
    ALTER TABLE CERTIFICATES
    ADD CONSTRAINT CERTIFICATES_USER_FILES_FK FOREIGN KEY
    CERT_FILE
    REFERENCES USER_FILES
    FILE_ID
    NOT DEFERRABLE
    What I'm trying to do is to allow users to fill out all the certificate data and upload a file in an APEX form. Once submitted the file should be uploaded in the USER_FILES table and all the fields along with CERT_ID, which is the foreign key pointing to the file in the USER_FILES table to be populated to the CERTIFICATES table. APEX wizard forms are based on one table and I'm unable to build form on both tables.
    That's why I've created a view (V_CERT_FILES) on both tables and using INSTEAD OF trigger to insert/update both tables. I've done this before and updating this kind of views works perfect. Here is where the problem comes, if I'm updating the view all the data is updated correctly, but if I'm inserting into the view all the fields are populated at CERTIFICATES table, but for USER_FILES only the fields FILE_ID and LAST_UPDATE_DATE are populated. The rest three regarding the LOB are missing: BLOB_CONTENT, FILENAME, MIMETYPE. There are no errors when running this from APEX, but If I try to insert into the view from SQLDeveloper, I got this error:
    ORA-22816: unsupported feature with RETURNING clause
    ORA-06512: at line 1
    As far as I know RETURNING clause in not supported in INSTEAD of triggers, although I didn't have any RETURNING clauses in my trigger (body is below).
    Now the interesting stuff, after long tracing I found why this is happening:
    First, insert is executed and the BLOB along with all its properties are uploaded to wwv_flow_file_objects$.
    Then the following insert is executed to populate all the fields except the BLOB and it's properties, rowid is RETURNED, but as we know RETURNING clause is not supported in INSTEAD OF triggers, that's why I got error:
    PARSE ERROR #1918608720:len=266 dep=3 uid=48 oct=2 lid=48 tim=1324569863593494 err=22816
    INSERT INTO "SVE". "V_CERT_FILES" ( "CERT_ID", "CERT_OWNER", "CERT_VENDOR", "CERT_NAME", "BLOB_CONTENT") VALUES (:B1 ,:B2 ,:B3 ,:B4, ,EMPTY_BLOB()) RETURNING ROWID INTO :O0
    CLOSE #1918608720:c=0,e=11,dep=3,type=0,tim=1324569863593909
    EXEC #1820672032:c=3000,e=3168,p=0,cr=2,cu=4,mis=0,r=0,dep=2,og=1,plh=0,tim=1324569863593969
    ERROR #43:err=22816 tim=1324569863593993
    CLOSE #1820672032:c=0,e=43,dep=2,type=1,tim=1324569863594167
    Next my trigger gets in action, sequences are generated, CERTIFICATES table is populated and then USER_FILES, but only the FILE_ID and LAST_UPDATE_DATE.
    Finally update is fired against my view (V_CERT_FILES), reading data from wwv_flow_files it populates BLOB_CONTENT, MIMETYPE and FILENAME fields at the specific rowid in V_CERT_FILES, the one returned from the insert at the beginning. Last, file is deleted from wwv_flow_files.
    I'm using sequences for the primary keys, this is only the body of the INSTEAD OF trigger:
    select user_files_seq.nextval into l_file_id from dual;
    select certificates_seq.nextval into l_cert_id from dual;
    insert into user_files (file_id, filename, blob_content, mimetype, last_update_date) values (l_file_id, :n.filename, :n.blob_content, :n.mimetype, sysdate);
    insert into certificates (cert_id, cert_owner, cert_vendor, cert_name, cert_file) values (l_cert_id, :n.cert_owner, :n.cert_vendor, :n.cert_name, l_file_id);
    I'm surprised that I wasn't able to find a valuable source of information regarding this problem, only MOS note about running SQLoader against view with CLOB column and INSTEAD OF trigger. The solution would be to ran it against base table, MOS ID 795956.1.
    Maybe I'm missing something and that's why I decided to share my problem here. So my question is how do you create this kind of architecture, insert into two tables with a relation between them in APEX ? I read a lot in the Internet, some advices were for creating custom form with APEX API, create a custom ARP, create two ARP or create a PL/SQL procedure for handing the DML?
    Thanks in advance.
    Regards,
    Sve

    Thank you however I was wondering if there was an example available which uses EJB and persistence.

  • Problem : Inserting Data from flat file  into  databse

    Hi,
    i m reading values from sybase tabel and writing those values into a flat file . some of those values are from table columns which has custom data type. the next thing i do is, read values from file , and insert into different table with the same column definition. the problem is that the values those are inserted into table are different than actual values . i dont know what's really happening. if any body have any idea ,plz help.

    when values are inserted ,only some column values are not inserted properly. i am reading those values as getBytes ,storing them in file and after that inserting into database using setBytes. but the values which are in file are different than those get inserted into database.
    dont know what is exact problem . is there something wrong with encoding. does anybody have any idea about this. what is basic encoding that sybase is using.

  • How to insert data from a table into itself if they don't already exist meeting a certain condition

    First, let me apologize as I did not write/design this mess, just inherited this terrible design and legacy application!
    I have table of companies and a table of suppliers with various attributes and of them being a bit column of is_public.  The public suppliers then need to be inserted into the table as suppliers for the other suppliers.
    As an example, in the company table company 'PUB01' is flagged as a public supplier (Company.IS_PUBLIC_SUPPLIER = 1).  Therefore in the Suppliers table I need to insert a row for each each of PUB01's suppliers in that same table to all the other suppliers
    in that table if they do not already exist as follows:
    Here is a sample of the table structure:
    CREATE TABLE [dbo].[COMPANY](
    [COMPANY_ID] [nvarchar](15) NOT NULL,
    [COMPANY_NAME] [nvarchar](100) NOT NULL,
    [IS_PUBLIC_SUPPLIER] bit NOT NULL,
     CONSTRAINT [PK_COMPANIES] PRIMARY KEY CLUSTERED 
    [COMPANY_ID] ASC
    ) ON [PRIMARY]
    GO
    CREATE TABLE [dbo].[SUPPLIERS](
    [SUPPLIER_ID] [int] IDENTITY(1,1) NOT NULL,
    [COMPANY_ID] [nvarchar](15) NOT NULL,
    [SUPPLIER_NAME] [nvarchar](100) NOT NULL,
    [PUBLIC_SUPPLIER_ID] [int] NULL,
     CONSTRAINT [PK_SUPPLIER_MASTER] PRIMARY KEY CLUSTERED 
    [SUPPLIER_ID] ASC
    GO
    Thanks!

    Thanks Visakh!  Will that work if some have already been inserted previously?
    Yes
    but if you want to exclude them use this
    INSERT INTO Suppliers(Company_ID,Supplier_Name,PUblic_Supplier_ID)
    SELECT s1.Company_ID,
    s2.Supplier_Name,
    s2.Supplier_ID
    FROM Suppliers s1
    CROSS JOIN Suppliers s2
    WHERE EXISTS(
    SELECT 1
    FROM Company
    WHERE Company_ID = s2.Company_ID
    AND IS_PUBLIC_SUPPLIER = 1
    AND s1.COMPANY_ID <> s2.COMPANY_ID
    AND NOT EXISTS (SELECT 1
    FROM Suppliers
    WHERE Company_ID = s1.Company_ID
    AND Supplier_Name = s2.Supplier_Name
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to insert data from the form to the database problematically

    Hi,
    Please anyone can help me with a code to insert a new record in database using code.
    i have dragged and dropped createInsert operation and on their action calling insert() method in backing bean.
    But wat i m suppose to write code so that data will be inserted as well as committed?

    Hi,
    Always mention your JDev version and technologies used.
    Have you tried executing the commit method as well (inside your insert() method)?
    -Arun

  • Insert data from a field into the subject of an email generated form a form

    Hi,
    Is there a way to have the contents of a field come up in the subject of an email that is made when a submit by email button is clicked.
    The data we want is from a date field for a 'week commencing'.
    We have a text string that is entered on the button's properties - email subject, but we'd like to add the contents of a field on the form onto this.
    any ideas?
    thanks,
    declan.

    Try this code in the click-event of the mail-button (you will have to adjust it of course):
    var anrede;
    if (xfa.form.Formular.Beratungsprotokoll.Kunde.Anrede.rawValue == "Herr") {
    anrede = "Sehr geehrter Herr "; }
    else {
    anrede = "Sehr geehrter Frau "; }
    var mailText = anrede + xfa.form.Formular.Beratungsprotokoll.Kunde.Name.rawValue +
    "\nPlease print this form and mail it to me!" +
    "\n\nTo speed up processing you can also click on the button 'ok'. " +
    "This will generate an e-mail. Please send this e-mail to me." +
    "\n\nThank you" +
    "\nYour agent";
    event.target.submitForm({cURL:"mailto:" +
    Formular.Beratungsprotokoll.Kunde.EMail.rawValue +
    "?subject=consulting minutes&body=" + mailText,
    cSubmitAs:"PDF",cCharset:"utf-8"});

  • Store data from a table into excel sheet and email

    Hi all,
    I am just wondering, i m not sure where to start. I want to insert data from a table into an excel spread sheet.
    I'm working on a stored procedure with 3 input parameters:
    1. the actual query
    2. userid
    3. the column headers (comma separated) - these will be in the same order as the outer select statement in the query itself. I will use the column headers for the respective columns in Excel worksheet.
    When the proc is executed, the excel is populated. If the record count is > 65536, then I need to create multiple worksheets in the same excel file.
    How can i do that? Can any body please help with this..?

    We are doing like this ( Not sure whether it is the best method available)
    --Get the output of the query (Since the number of columns is not fixed you would have to use dbms_sql package)
    --loop through the output and write into a file, for example test.csv, using UTL_FILE package
    --load the file into a blob variable(we are doing it by loading it into a table)
    --For mailing You can use the below package
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    Mailing code we are using is given below:
    CREATE OR REPLACE procedure xls_mail(
        p_sender     varchar2, -- sender, example: 'Me <[email protected]>'
        p_recipients varchar2, -- recipients, example: 'Someone <[email protected]>'
        p_subject    varchar2, -- subject
         p_text           varchar2, -- text
         p_filename      varchar2, -- name of xls file
         p_blob           blob         -- xls file
    ) is
      conn      utl_smtp.connection;
      i number;
      len number;
    BEGIN
      conn := demo_mail.begin_mail(
        sender     => p_sender,
        recipients => p_recipients,
        subject    => p_subject,
        mime_type  => demo_mail.MULTIPART_MIME_TYPE);
      demo_mail.begin_attachment(
        conn         => conn,
        mime_type    => 'application/xls',
        inline       => TRUE,
        filename     => p_filename,
        transfer_enc => 'base64');
        -- split the Base64 encoded attachment into multiple lines
       i   := 1;
       len := DBMS_LOB.getLength(p_blob);
       WHILE (i < len) LOOP
          IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
             UTL_SMTP.Write_Raw_Data (conn
                                    , UTL_ENCODE.Base64_Encode(
                                            DBMS_LOB.Substr(p_blob, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
          ELSE
             UTL_SMTP.Write_Raw_Data (conn
                                    , UTL_ENCODE.Base64_Encode(
                                            DBMS_LOB.Substr(p_blob, (len - i)+1,  i)));
          END IF;
          UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
          i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
       END LOOP;
      demo_mail.end_attachment(conn => conn);
      demo_mail.attach_text(
        conn      => conn,
        data      => p_text,
        mime_type => 'text/html');
      demo_mail.end_mail( conn => conn );
    END;

Maybe you are looking for

  • How can I recover BFILE images from a table?

    I`m a Spanish student, so excuse me for my poor english. I have used LOB objects to insert images into some tables of a DataBase. However, I have tried to recover the inserted images to put those into a Developer 6 Form, and I haven4t done it. ?Have

  • PRAA - Personnel numbers with already existing Vendor master record

    Hi gurus, We are using tcode PRAA to create vendor master, we notice some employees did not get converted to FK02 with the message "Personnel numbers with already existing Vendor master record". I checked FK02/FK03, but i didn't see any employee/vend

  • SMS Site Componenet Manager - Componenet Not Installed

    Hi, We're using SCCM 2012 R2 with the databases on a SQL 2012 Failover Cluster (2 nodes).  Active node is SQLNode-1.  We're getting the following error: Site Component Manager could not create the Configuration Manager Server Components' installation

  • Is 96 kbps good enough for iTunes Match?

    I have a pretty large music collection (20,000) but in order to save space I converted it all to 96 kbps. My question is whether or not that is good enough for iTunes Match? I've seen some people who haven't had any problems with 96 kbps but Apple sa

  • I can't hear one of the channels on my ipod--what should I do?

    One of the channels on my iPod isn't working. I can hear it when I wiggle the headphone jack in the input, but it doesn't last. I have AppleCare. Should I take it into my local Apple store? Devin dell   Windows XP