PL/SQL :: Generate Excel File And Send It As Attachment

Apr 10, 2013

I have a requirement to send email with attachment using PL/SQL procedure of 10g database. We will be querying data from database, generating excel(csv) file and attaching to email. How can I achieve this goal.

I have a procedure that will send email as HTML but it has limitations of sending 32K data.

CREATE OR REPLACE procedure send_email(
p_to            in varchar2,
p_from          in varchar2,
p_subject       in varchar2,
p_text          in varchar2 default null,
[code]........   

View 21 Replies


ADVERTISEMENT

SQL & PL/SQL :: Send Mail With XML File Attachment?

Sep 24, 2010

i want to send mail with xml attachment.i create a procedure to send mail, when i send pdf,text file, they are open properly but if i send xml file i does not open...

/* Formatted on 2010/09/24 15:25 (Formatter Plus v4.8.8) */
CREATE OR REPLACE PROCEDURE apps.send_mail
AS
p_sender VARCHAR2 (80)
:= 'my@company.com';
p_recipient VARCHAR2 (80)

[code]....

View 1 Replies View Related

Send CSV File As Attachment In Mail PL/SQL

Mar 15, 2011

Send a CSV file as attachment in a mail PLSQL. MY CSV file is already present in server. I just need to pickup that file and send the same as mail attachment.

View 1 Replies View Related

SQL & PL/SQL :: Email Excel File As Attachment In Mail Through Oracle Procedure?

Mar 3, 2011

I need to email an excel file as an attachment in the mail through oracle procedure. I am using UTL_TCP option.

The remote_host i use in test environment is the 'name of the test server'. This test server is a oracle10g database on AIX server.In the test environment the mail works fine.

utl_tcp.open_connection(remote_host => 'test server',
remote_port => 25,
tx_timeout => null);

The same thing if i use in production environment, it does not work. The production server is a 9i database on a unix server.

utl_tcp.open_connection(remote_host => 'prod server',
remote_port => 25,
tx_timeout => null);

Does the 10g has option to host SMTP service as apposed to 9i?

View 12 Replies View Related

SQL & PL/SQL :: Image In XML To Generate Excel File

Jul 8, 2010

how to attach an IMAGE in XML and that will be used in PL SQL procedure to generate the Excel file with the IMAGE. I cannot able to save the xml as excel with the image

View 3 Replies View Related

Forms :: How To Generate Excel File

Jun 12, 2012

I want to gerate the excel(Office 2010)file using oracle forms 6i. How we can achieve this with forms 6i?

View 4 Replies View Related

Reports & Discoverer :: How To Generate Matrix Report To Excel File

Aug 22, 2007

how to generate matrix report to excel file. i have done this . but the exact layout is not getting displayed in the excel file. I have attache the layout i ma trying to export to excel.

View 8 Replies View Related

SQL & PL/SQL :: How To Send Email With Attachment

May 4, 2010

I need to send email with attachment file. The input file is reside in the server. Currently, i can create and send file through the email. But it is not the file that i want from the server, it is actually create the attachment file. How can i get the file from server and put it as attachment? below is the codes :

create or replace
Procedure test_email_mt(p_sender IN VARCHAR2,
p_recipient IN VARCHAR2,
p_message IN VARCHAR2)
as

[code]...

View 5 Replies View Related

Forms :: How To Send Mail With Attachment

Jun 7, 2010

How to send mail with attachment ?

View 2 Replies View Related

SQL & PL/SQL :: Create Large CSV And Send It As Attachment

Jun 22, 2012

Can i send a large file( over 1 million) as email attachment as .CSV file...?

I have a requirement to send a large file ".CSV" when the procedure / package is invoked as email attachment. The data in the CSV file is pulled from a table (as below).

(1) I tried below code to execute "send_email" which is uses utility UTL_SMTP. It is working fine with
100000 records and getting an email attachment with .csv
(2) If more 100000 i am not getting any email / attachment.

I am looking forward to send a huge data like 1 million.
>>>>>>>>>>>>>>>>>>>>>
DECLARE
l_clob CLOB;
l_attach_text VARCHAR2 (32767);
l_attach_text_h VARCHAR2 (32767);
Cursor c1 is
SELECT LOCATION,PARTY_NAME,ADDRESS1,CITY,STATE_PROV,COUNTRY,POSTAL_CODE FROM emp_table;
[code].......

View 11 Replies View Related

How To Send BLOB In Attachment In Oracle 10g

Feb 16, 2013

Actuall we requried to send and email from Oracle 10g database having attachements big in size aprox 10 to 30 MB.Is there any Custom Procedure or standard procedure for this.

We are using UTL_SMTP and UTL_MAIL (Only support RAW attachement upto 32 k in size).

View 3 Replies View Related

Send Email With Attachment Using Stored Procedure?

Jun 17, 2011

I would like to send an email with attachment using a STORE PROCEDURE, with a PL/SQL, I was testing a package called SRW.RUN_REPORT but the problem is that the report generate a pdf file but this file is storage in application server because the report server run over the application, wo we can not get the physical file to send as attach.

the problem is generate the pdf file save in a place that we can get easier.

View 8 Replies View Related

SQL & PL/SQL :: Send Email Attachment Using Utl_mail.send_raw Utility And Not Successful

Jun 6, 2011

I am trying to send an email attachment using "utl_mail.send_raw" utility and not successful. Constantly I keep getting an error:

"ORA-20001: An error has occured: ORA-20001: ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "APPOWNER.SANDEEP_CT_FILE", line 103"

I think it's emanating from "ORA-06508: PL/SQL: could not find program unit being called".

a) this morning my production dba " utlmail.sql in DEVELOPMENT as sys.

b) Create or replace directory TEMP_SANDEEP as '/u01/data' (This was created so that BFILENAME could read it + "dbms_lob.fileopen" needs to access this from Oracle directory and not Operating system directory)

c) 'u01/data' exists on Unix development box.

d) Then I created the following procedure to create a text file (text file's name is currentdate.txt i.e. 06062011.txt) that has some information. Once created, the UTL_MAIL.SEND_RAW should pick this file up and email this to concerned parties(and in this case it's me as I am doing this on development environment).

Code for the above is as follows:

CREATE OR REPLACE procedure sandeep_ct_file is
/*Variable declarations */
v_dir_location varchar2(100);
v_file_name varchar2(100);
v_file_handle UTL_FILE.FILE_TYPE;
v_report LONG := chr(10)||'Prog Code' ||' '||
[code]....

Do I have to defined SMTP connections and parameters?

View 10 Replies View Related

SQL & PL/SQL :: Email With Excel Attachment

Aug 4, 2011

I need the pl/sql procedure that sends email with excel attachment using utl_smtp.The email procedure should take the excel attachment file from my local directory.

View 6 Replies View Related

SQL & PL/SQL :: Sending Excel Attachment Through Oracle

Nov 23, 2010

i am able to send text/ csv attachment thru oracle PL/Sql Procedure. But i am facing this for excel attachment, some junk character is coming while opening that attachment excel file.

i am attaching here with my coding for your view. Anything i have to configure at my SMTP server.

View 5 Replies View Related

SQL & PL/SQL :: Procedure For Sending Mail With Excel / Pdf Attachment Using Smtp?

Nov 24, 2010

send script to send mail with excel attachment using smtp from Oracle 9i

View 1 Replies View Related

Forms :: How To Send Mail To Lotus Notes With Attachment From Oracle Forms

Feb 7, 2011

Query :"how to send mail to lotus notes with attachment from oracle forms"?

View 2 Replies View Related

Reports & Discoverer :: How To Generate Report And Send Straight To Email

Apr 11, 2013

How to generate a report and straight send it to an Email? I want to match student reg number and the parents email provided .

View 1 Replies View Related

Forms :: How To Generate Excel In Oracle 11g

May 4, 2012

I had a form in oracle 6i with which I can generate an excel sheet when clicked a button(by using ole2 built in)...this form I have converted to oracle forms 11g and replaced the ole2 with client_ole2 and added webutil library...but the excel is not generated as in 6i.

View 1 Replies View Related

SQL & PL/SQL :: Single Excel File For Emp Table Department Wise In Different Sheets Of Excel

Mar 30, 2012

I need to generate a single excel file which each department details in seperate sheets of the excel file, each sheet should ne named with department no (ex :Dept_10, Dept_20,Dept_30) and the main excel should be named as Emp_details.

Header row and total row should be in bold.I have created 3 individual excels thru toad and moved them to single excel and renamed the sheets.

Can we programatically do this thru SQL or PL/SQL, does Oracle provide any build packages for excel.As excel files cannot be uploaded,I am unable to upload the excel file I generated manually.

select to_char(empno) empno,ename,job,mgr,hiredate,
nvl(sal,0) sal,nvl(comm,0) comm,nvl(sal,0) + nvl(comm,0) "Total Income" ,deptno
from emp
where deptno = 10
union all
select 'Total',null,null,null,null,sum(nvl(sal,0)),sum(nvl(comm,0)),sum(nvl(sal,0))+sum(nvl(comm,0)),null
from emp
where deptno = 10;

View 1 Replies View Related

SQL & PL/SQL :: Sending Email With PDF File Attachment?

Nov 23, 2010

How to Sending Email With PDF File attachment.

View 3 Replies View Related

Reports & Discoverer :: Generate Excel Report Output With Maximum No Of Rows?

Nov 24, 2011

I created an xml report of output type 'xsl'. When the report output is generated for more than 65,536 rows then the report out put is not opening. generate excel report output with maximum no of rows.

View 1 Replies View Related

SQL & PL/SQL :: Error While Sending Text File As Attachment From Oracle 10g?

Sep 24, 2010

I've written a pl/sql to send mail. It works fine. Now i want to modify it to send an attachment txt/scv/xls file.This file is residing on client's pc.How to do it?

Following is pl/sql for sending mail.

create or replace PROCEDURE SEND_MAIL(P_SENDER IN VARCHAR2,P_RECIPIENT IN VARCHAR2,P_MESSAGE IN VARCHAR2,P_SUBJECT IN VARCHAR2 )IS
MAILHOST VARCHAR2(30) := 'MAILHOST.TIFR.RES.IN';
MAIL_CONN UTL_SMTP.CONNECTION;
BEGIN
MAIL_CONN := UTL_SMTP.OPEN_CONNECTION(MAILHOST, 25); -- TYPICALY 25 S THE PORT NUMBER FOR INCOMMING SMTP REQUESTS ON YOUR SMTP MAIL HOST
UTL_SMTP.MAIL(MAIL_CONN, '<'||P_SENDER||'>'); -- THE '<' AND '>' DEPEDS ON WHAT TYPE OF SMTP MAIL HOST U'RE RUNNING THIS ONE'S A NETSCAPE SMTPHOST

[code]......

View 2 Replies View Related

Application Express :: How To Make Default Attachment As CSV File Instead Of HTM

Oct 28, 2012

I am having an interactive report with an email subscription.

My question is, how can I make the default attachment as a .csv file instead of the .htm file?

View 2 Replies View Related

PL/SQL :: Attached XML File And Send Email

Jan 18, 2013

I have ready xml file of around 100KB at location C: est.xml .

Now I just want to attached this file and send email to particular person using Oracle PL/SQ . can I get code for that?

View 1 Replies View Related

Generate A Text File

Apr 28, 2008

i have be requested to create a .txt file. Its for a program that will read the txt file i create to produce a letter i.e I will be extracting, TITLE, FORENAME, SURNAME etc

MR
JOE
BLOGGS

Here is the my code so far,

SELECT
LPA_INPUT.INPUT_TITLE,
LPA_INPUT.INPUT_SURNAME,
LPA_HISTORY.LPA_AMT,
LPA_HISTORY.ELIG_RATE,
LPA_HISTORY.RATE_REBATE,
LPA_HISTORY.RR_AMT,
LPA_HISTORY.LPA_APPLIC,
LPA_HISTORY.LPA_AMT
FROM LPA_HISTORY, LPA_INPUT
WHERE LPA_HISTORY.CLAIM_NO = LPA_INPUT.CLAIM_NO
----------------------------------------------------
Iv been asked to have these eight fields looping over and over for all the records in the database, So im not sure how to do that and how to generate it in a txt file?! I have to produce it in a script and not by a Export/Import wizard in sql server mangement studio!!!

View 11 Replies View Related

SQL & PL/SQL :: Send Mail From Procedure With Attach From File System

Apr 5, 2011

I can send mail with UTL_MAIL using this:

CREATE OR REPLACE PROCEDURE send_mail_file_seti IS
BEGIN
UTL_MAIL.SEND_ATTACH_VARCHAR2(
sender => 'mail@from.com',
recipients => 'mail@to.com',
message => '<HTML><BODY>See attachment</BODY></HTML>',
[code]........

What I want to do is send mail attaching a file from file system. For example, I have this file:

/oracle/pmp/file

I want to send it using a procedure like the one above.

View 6 Replies View Related

SQL & PL/SQL :: Generate Command To Rename Log File From ASM To Non-ASM

Apr 9, 2013

I am in the process of recovering a database from an ASM environment to a non-ASM environment using RMAN. I've got a query to generate the command to RENAME the file:

SELECT 'ALTER DATABASE RENAME FILE '''||MEMBER||''' TO '''||'/u01/data/dev'||
SUBSTR(MEMBER,
INSTR(MEMBER, '/', -1, 1),
INSTR(MEMBER, '.', 1, 1) - INSTR(MEMBER, '/', -1, 1)) ||
DECODE(SUBSTR (MEMBER, 1, INSTR(MEMBER, '/', 1, 1) -1), '+DATA', 'a', '+FRA', 'b', 'c') ||'.log'';'
FROM V$LOGFILE;

When I run the query, this is an example of the result I get:

ALTER DATABASE RENAME FILE '+FRA/db1/onlinelog/group_3.259.766075171' TO '/u01/data/dev/group_3b.log';
ALTER DATABASE RENAME FILE '+DATA/db1/onlinelog/group_1.262.766075829' TO '/u01/data/dev/group_1a.log';

But I want to replace the "group" with "redo" and get the below result:

ALTER DATABASE RENAME FILE '+FRA/db1/onlinelog/group_3.259.766075171' TO '/u01/data/dev/redo_3b.log';
ALTER DATABASE RENAME FILE '+DATA/db1/onlinelog/group_1.262.766075829' TO '/u01/data/dev/redo_1a.log';

View 7 Replies View Related

Generate Trace File With Required Name

Jul 26, 2013

As a sys user i want to trace a user session. so i am using 

SQL> EXEC DBMS_SYSTEM.set_sql_trace_in_session(sid=>123, serial#=>1234, sql_trace=>TRUE);SQL> EXEC DBMS_SYSTEM.set_sql_trace_in_session(sid=>123, serial#=>1234, sql_trace=>FALSE); 

to trace. but this trace file is mixing with another trace files in udump. did some Google and found that we can use

ALTER SESSION SET TRACEFILE_IDENTIFIER = "MY_TEST_SESSION".

but this will generate trace file for sys user account not for the desired user session. how we can define trace file name for desired user session trace. 

View 2 Replies View Related

Reports & Discoverer :: Generate PDF File With Password Protection?

Aug 18, 2010

Is it possible to generate .pdf file with password protection.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved