Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    14

    Unanswered: Carriage Return In Variable

    I have written a procedure to send an email From Oracle Forms.

    The email sends correctly but the body of the message is a messed up.

    The variable I am using for the body of the email is as follows

    Code:
    	v_body := 'Hi ' || :EMPLOYEE.NAME || 'CHR(13)CHR(13)';
    	v_body := v_body || 'The following holidays that you have requested have been authorised. CHR(13)CHR(13)';
    	v_body := v_body || 'Start Date: ' || :LEAVE.START_DATE || 'CHR(13)';
    	v_body := v_body || 'End Date: ' || :LEAVE.END_DATE || 'CHR(13)';
    	v_body := v_body || 'Total Days: ' || :LEAVE.TOTAL_DAYS || 'CHR(13)CHR(13)';
    	v_body := v_body || 'Regards ' || v_uname;
    The output from this is

    Code:
    Hi TESTCHR(13)CHR(13)The following holidays that you have requested have been authorised. CHR(13)CHR(13)Start Date: 15-MAR-05CHR(13)End Date: 16-MAR-05CHR(13)Total Days: 1CHR(13)CHR(13)Regards TEST
    I want the variable to contain carriage returns where CHR(13) is.

    Anybosy be able to shed some light on this.

    Thanks in advance
    Seán

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Anybosy be able to shed some light on this.
    Oracle did exactly what you told it to do.
    Try removing the single quote marks from around CHR(13).
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Nov 2004
    Posts
    14
    DOH!!!!!!1

    i removed the single quotes around the CHR(13) and got a compliation error.

    The reason for this compliation error was that I had

    Code:
    CHR(13)CHR(13)
    where i needed to put

    Code:
    CHR(13) || CHR(13)

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •