How To Remove Newline Character At Start In Attachment

Jan 9, 2013

I have been trying to attach a .dat file generated at an external source and send it as an attachment by mail using UTL_SMTP, all things are working but the .dat file which comes attached in mail contains a newline character i.e. chr(10) at the start line and the contents of the file are written from second line onwards. Below is some part of the code which deals with read/write of attachment of mail to be sent.

UTL_SMTP.write_data(c,
'Subject' || ': ' || P_SUBJECT || UTL_TCP.crlf);
UTL_SMTP.write_data(c,
'MIME-Version: 1.0' || UTL_TCP.crlf || -- Use MIME mail standard
'Content-Type: multipart/mixed;' || UTL_TCP.crlf ||
[code]....

View 5 Replies


ADVERTISEMENT

SQL & PL/SQL :: Email With Attachment / How To Remove Empty Line

Jun 22, 2010

I need to send email notifications with attachments. Below is my testing codes.

declare
text varchar2(32000);
crlf VARCHAR2(2) := chr(13)||chr(10);
begin
text := 'Test only'||crlf||'test 2'||crlf||'test 3';
UTL_MAIL.SEND_ATTACH_VARCHAR2(
[code]......

I notice that, there is an empty line at the top of the content of this file. I don't want the empty line to be included in my file.

View 4 Replies View Related

SQL & PL/SQL :: Remove / Trim More Than One Character?

Aug 15, 2010

How to write a pl/sql query to trim/remove more than one character from string.

Like the itemfield is 'Profit CY' I want it to show as 'Profit' but only for itemfields that say 'Profit CY' in the column for remaining items in column such as 'Loss CY' should stay as it is.

View 25 Replies View Related

PL/SQL :: Remove Character From Text File

Apr 4, 2013

I create a text file with cobol, and now I need to remove the last character of each line with pl / sql. For example:

12 *
23 *
45 *

I need to remove *

View 7 Replies View Related

SQL & PL/SQL :: Unable To Remove Hidden Character From Field

Mar 9, 2011

I ran into the following issue as mention below.

select dump(column_name) from table where column_name2 = 'HP1';

dump(column_name)
--------------------------------------------------------------------------------
Typ=1 Len=5: 194,160,82,88,66

I am trying to get right of these hidden character 194 and 160. i tried different method as mention below,

1) translate(column_name, chr(194)|| chr(16),'')

View 7 Replies View Related

SQL & PL/SQL :: UTF8 - Unable To Remove Hidden Character From Field

Mar 20, 2012

My database is in UTF8 character set..

And it is not supporting chr(194)||chr(160)

what character set you were using then ?

And.. is there a way to handle non breaking spaces in UTF8..

View 16 Replies View Related

CLOB Removing Newline Characters

Dec 13, 2008

I am persisting xml with below mention tag which contains preformatted text data.

<SECTION>
<HDG><![CDATABusiness Summary]></HDG>
<BODY>
<![CDATA[(C) 2008 D&B
COPYRIGHT 2008 DUN & BRADSTREET INC. - PROVIDED UNDER CONTRACT
FOR THE EXCLUSIVE USE OF SUBSCRIBER 263763803.
ATTN: null
[code]....

Now, when i retrieve this xml from oracle CLOB column, i am getting data in body tag as below:

(C) 2008 D&B COPYRIGHT 2008 DUN & BRADSTREET INC. - PROVIDED UNDER CONTRACT FOR THE EXCLUSIVE USE OF SUBSCRIBER 263763803. ATTN: null US TEST COMPANY 984 DUNS: 36-252-8379 RATING DS US FICTITIOUS COMPANY 984 BUSINESS SERVICES EMPLOYS UNDETERMINED 899 EATON AVE SIC NO. BETHLEHEM PA 18025 7389 TEL: 610 882-0005 RICHARD DOE, MANAGER RECORD TYPE: DUNS SUPPORT THE "DS" INDICATOR ASSIGNED TO THIS BUSINESS MEANS THAT THE LIMITED INFORMATION CURRENTLY IN THE D&B FILE DOES NOT ALLOW US TO CLASSIFY IT WITHIN OUR RATING SYSTEM. WE ARE PROVIDING THIS INFORMATION TO YOU IN THE INTEREST OF SPEED WITHOUT HAVING COMPLETED AN INVESTIGATION. THEREFORE, THIS REPORT MAY NOT REFLECT THE CURRENT STATUS OF THIS BUSINESS. D&B CAN INVESTIGATE THIS BUSINESS AND UPDATE THIS INFORMATION BASED ON THE RESULTS OF THAT INVESTIGATION.

All text formatting goes for a toss (newline, trailing tab characters are getting trimmed).provide any inputs on how to avoid this. Text formatting needs to be preserved.

View 1 Replies View Related

Server Administration :: How To Know Character Set As Single Character Or Multi Character

Sep 26, 2013

how do we know database character set is either single character set or multi character set?

While changing character-set from AL32UTF8 to WE8MSWIN1252 got "ORA-12712: new character set must be a superset of old character set".

Below are steps taken to resolve the issue -

ALTER DATABASE CHARACTER SET WE8MSWIN1252;

i got this error: ORA-12712: new character set must be a superset of old character set

below are the commands executed by me:

SQL> SHUTDOWN IMMEDIATE;
SQL> CONNECT SYS/password AS SYSDBA;
SQL> STARTUP MOUNT;
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL> ALTER DATABASE OPEN;
SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE WE8MSWIN1252;
SQL> SHUTDOWN;
SQL> STARTUP;
SQL> QUIT;

And its working...

I have not done it in proper order. Neither have done ccsscan. Still, no user reported any issues. Do my changes truncated the data?

View 11 Replies View Related

Installation :: Fail To Start OCR And OS / Error When Start OracleCSService

Jun 5, 2012

I'm trying to install Oracle 10g Enterprise Ed. (on Windows 2003 Std. Ed) and I get some errors:

First “Fail to start OCR” I press "continue" and the installation continue. Next “Operative System Error when start OracleCSService” and when I press "continue" the installation finish.

At the end of installation, It seems like Oracle DB is Ok, but not really...I can't connect to database from Enterprise Manager and the OracleCSService is in "Starting mode".

View 3 Replies View Related

SQL & PL/SQL :: How To Insert Special Character / ORA-00911 / Invalid Character

May 25, 2010

We have Oracle 10g and user trying to Insert following in one of our table field and getting error:

'REVOLUCIÃ"N Historical Corruptions Agenda'

Getting follwoing error:

ORA-00911: invalid character
create table Employee
(Emp_ID Varchar2 (10),
Company_Name Varchar2 (40)
)
Insert into Employee
values ('Emp1', 'REVOLUCIÃ"N Historical Corruptions Agenda');

View 5 Replies View Related

Inserting Character From Extended ASCII Character Set?

Mar 8, 2007

I'm trying to insert a character from the extended ascii character set. Specifically, there's a company that has an accented e (�) in the name. Right now, the company name doesn't have the e at all, accent or no accent. So I'm trying to do an update, something like

update table1 set company_name='blah�" where company='blah'

It runs, but doesn't do the update. Even when I try to forcefully do an insert (instead of an update) I get nowhere; the accented is simply dropped. So the basic question is, how do you insert extended ascii characters into oracle?

View 3 Replies View Related

PL/SQL :: How To Select String Between Nth Specific Character To Nth+1 Character

Aug 9, 2012

I have one string 'SWAP_20120224_MEGAMART_MAR_Sales.csv'

I want to get the string between second underscore and third underscore i.e. 'MEGAMART'

How to achieve this in sql statement?

View 4 Replies View Related

Globalization :: Character Encoding - LATIN-1 Character In UTF-8 DB?

Feb 9, 2013

I am using C++ OCI LIB, to insert some report data from remote OCI client to oracle 11 server. This data is read by another process to create the report.The DB CHARSET is UTF-8. But the report tool expects the data to be ISO08859-1 encoded. So while inserting the data into the database i specify the following LANG and CHARSET for my table colulmn in client:

The TARGET DB CHARSET is UTF-8
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
size_t csid = 871; // UTF-8
OCIAtrSet((void *) bnd1p, (ub4) OCI_HTYPE_BIND,
*(void *)&csid*,
(ub4) 0,
(ub4)OCI_ATTR_CHARSET_ID, errhp);

This solution works for almost every case of ASCII and Extended ASCII Charest but we are facing issues if we have few specific characters to be inserted.f we are trying to insert single beta character [β] through client, the data goes empty to the column.

Beta Character details:
DEC     OCT     HEX     BIN     Symbol           Description
223     337     DF     11011111     ß     Latin small letter sharp s - ess-zed

DB Output after insert single β:
select rawtohex(NAME) from PERSONS where EID=333;

RAWTOHEX(NAME)
---------------------------

But if the string is *"ββ"* everything work fine:
DB Output for "ββ":
select rawtohex(NAME) from PERSONS where EID=333;

RAWTOHEX(NAME)
---------------------------
DFDF

View 6 Replies View Related

PDF Attachment From Apex Application?

Aug 8, 2011

I am using Apex 4.0.

We have a requirement to send the html contents saved in the CLOB column of a table as PDF attachment in the email from apex application. Currently we are sending the .htm file as the attachment from the apex application.

include the html contents as a PDF document with some small examples.

Currently I am using APEX_MAIL.ADD_ATTACHMENT to include the attachment and APEX_MAIL.SEND to send the mail. Currently we are sending the attachment in the .htm format.

The html data is present in the column of a table, which we are sending in the attachment as a htm file. Any example to send the PDF attachment using APEX_MAIL.ADD_ATTACHMENT.

View 1 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 :: 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

SQL & PL/SQL :: How To Do Attachment Email In Oracle

Jul 24, 2013

Below are my procedure and declaration. I can send email to internal and external with attachment.

But the attachment is blank. i don't know how to add path in the script. like i save 1 pic in d drive. from thr how i must do attachment.

below are the procedure

CREATE OR REPLACE PROCEDURE CUSTOMER.send_mail_2 (p_to IN VARCHAR2,
p_from IN VARCHAR2,
p_subject IN VARCHAR2,
p_text_msg IN VARCHAR2 DEFAULT NULL,
p_attach_name IN VARCHAR2 DEFAULT NULL,
p_attach_mime IN VARCHAR2 DEFAULT NULL,
[code].........

View 2 Replies View Related

Forms :: Email In Body But Not In Attachment

Jun 19, 2009

I am sending email with attachment (word, pdf) without any problem. Now what i want is, instead of attachment that pdf / word file should come in body part , like means in internet explorer pdf open inside the browser itself while surfing. so means as soon as user open email, content of word / pdf should display in body part. how can i do this. using forms 6i, and database 10g.

View 7 Replies View Related

Forms :: How To Send Mail With Attachment

Jun 7, 2010

How to send mail with attachment ?

View 2 Replies View Related

Forms :: Sending Mail With Attachment?

May 5, 2010

i am using oracle forms 9i and i want to send a mail with attachment.

View 1 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 :: Sending Email With PDF File Attachment?

Nov 23, 2010

How to Sending Email With PDF File attachment.

View 3 Replies View Related

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

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

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

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

Forms :: Sending Email With Report In PDF As Attachment?

May 1, 2009

I have the following code to send an email with a report as an attachment via forms. everything is running fine.

Now i do not have a message body in the email, so my question is how do i add some text as an email body

if i add the following parameter, its not working

ADD_PARAMETER(thelist, 'BODY',TEXT_PARAMETER, 'Check the attached Report');
DECLARE
report_id REPORT_OBJECT := find_report_object('checklist');
report_message VARCHAR2(100) :='';
rep_status VARCHAR2(100) :='';

[code]....

View 6 Replies View Related

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 View Related

PL/SQL :: Adding Image As Attachment To Email UTL_SMTP?

Jun 21, 2013

I am trying to add an image as attachment to an e-mail.

I am reading the image from the table and then passing it as a BLOB in my procedure.

Following is the part of the code which adds the attachment

{code}
PROCEDURE add_mail_attachment
(
/*

[Code].....

View 10 Replies View Related







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