apex_email using values of variables/article in p_body

How can I run the following code:

I can't get my select query values to generate inside the body of the email. I'm trying to use events. TYPE_ID or stuff like that in my p_body_html apex_mail

< tt >

BEGIN

FOR events IN (SELECT EBA_CA_EVENTS. EVENT_NAME, EBA_CA_EVENTS. EVENT_ID, EBA_CA_EVENTS. TYPE_ID, EBA_CA_EVENTS. ROW_KEY, EBA_CA_EVENTS. EVENT_DUE_DATE, EBA_CA_EVENTS. EVENT_NOT1, EBA_CA_EVENTS. EVENT_NOT2, EBA_CA_EVENTS. EVENT_NOT3, EBA_CA_EVENTS EBA_CA_EVENTS.COMPLETED_MAIL_SENT)

LOOP

If the events. TYPE_ID <>(32230291965131516245569156552736940921) AND (to_date (to_char (events. ((EVENT_DUE_DATE, "DD-MON-YYYY HH24:MI:SS"), "HH24:MI:SS MON-DD-YYYY")) = (to_date (SYSDATE) + events. EVENT_NOT1)

THEN

APEX_MAIL. SEND)

p_to = > ' [email protected] ',

p_from = > ' [email protected] ',

p_body = > ' ',

p_subj = > ' Date of scheduled critical event is close! Alert 1',

p_body_html = > events. Event_name ' < b > < /b > RESSA team critical event notification! < br > < br > the events. Critical event event_name is not yet complete! < br > < br >

Please fill out all the required measures and then mark the event as State finished in order to avoid escalation, thank you.

< br > < br > a brief review of the event details: < br > < br > < table > < tr > events. EVENT_DESC < /tr >

(< /table > ');

< /tt >

Richie,

You must use the concatenation operator (|), for example:

p_body_html => 'RESSA Team Critical Event Notification!

The ' || events.EVENT_NAME || 'critical event has not been completed yet!

Please complete all actions required and then mark event status as completed to prevent further escalation, thank you.

A brief reminder of the event details:

' || events.EVENT_DESC || '
');

Thank you

Erick

Tags: Database

Similar Questions

  • How to swap two values without using the third variable using the procedure

    How to exchange the two values without using the third variable using the procedure?

    In a procedure using two mode we pass two values A = x and B = y, and let us pass parameters to receive the output has A = y and B = x without using the third variable

    Published by: Millar on August 19, 2012 11:23

    Your question doesn't seem wise. As written, there is no reason to a third variable, just

    CREATE OR REPLACE PROCEDURE(
      x IN number,
      y IN number,
      a OUT number,
      b OUT number
    )
    AS
    BEGIN
      a := y;
      b := x;
    END;
    

    If it's an interview question, I suspect that the intention was that you had two settings IN OUT and you wanted to swap the values without the help of a third variable.

    Justin

  • Setting a value to variable using an sql and javascript

    Hello

    I'm trying to be a value of variables using javascript and sql. The code is as below:


    < script >
    function getDueDate() {}
    function getVal (item) {}
    If ($x (point) .value! = "")
    Return parseFloat ($x (item) .value);
    on the other
    Returns a null value.
    }
    $x('P26_DUE_DATE').value = select sysdate + $x ('P26_PAY_TERM') of the double
    }
    < /script >

    Can this be achieved?

    Hello

    JS and SQL are 2 different languages, so you can't do what you want to do using this script. The good thing is that you can still do so using JS.

    $x('P26_DUE_DATE').value = select sysdate + $x ('P26_PAY_TERM') of the double

    the "Select Sysdate" try to use the date JS Object (http://www.w3schools.com/jS/js_obj_date.asp) to add dates together.

    Martin
    -----
    [http://apex-smb.blogspot.com/]
    [http://apex.stackexchange.com/]

  • The use of bind variables (in &amp; out) with sql dynamic

    I have a table that contains code snippets to make postings on a set of pl/sql database. what the code does is basically receives an ID and returns a number of errors found.
    To run the code, I use dynamic sql with two bind variables.

    When codes consists of a simpel query, it works like a charm, for example with this code:
    BEGIN
       SELECT COUNT (1)
       INTO :1
       FROM articles atl
       WHERE ATL.CSE_ID = :2 AND cgp_id IS NULL;
    END;
    However when I get to post more complexes that must perform calculations or run several queries I run into trouble.
    I have boiled down the problem into that:
    DECLARE
       counter   NUMBER;
       my_id     NUMBER := 61;
    BEGIN
       EXECUTE IMMEDIATE ('
          declare 
             some_var number;
          begin
          
          select 1 into some_var from dual
          where :2 = 61; 
          
          :1 := :2;
          end;
    ')
          USING OUT counter, IN my_id;
    
       DBMS_OUTPUT.put_line (counter || '-' || my_id);
    END;
    This code is not really make sense, but it's just to show you what is the problem. When I run this code, I get the error
    ORA-6537 ON bind variable linked to a position IN

    The error doesn't seem wise,: 2 is the only one IN bind variable and it is only used in a where clause clause.
    As soon as I remove this where clause, the code works again (giving me 61-61, in case you want to know).

    Any idea what goes wrong? I just use bind variables in a way that you're not supposed to use it?

    I'm using Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit

    Correction. With immediate execution , the binding is in position, but binds do not need to be repeated. My statement above is incorrect...

    You must link only once - but bind by position. And the connection must correspond to the use of the variable binding.

    If the connection never variable assigns a value in the code, link by in.

    If the binding variable assigns a value in the code, link as OUTPUT.

    If the binding variable assigns a value and is used a variable in another statement in the code, link as IN OUT.

    For example

    SQL> create or replace procedure FooProc is
      2          cnt     number;
      3          id      number := 61;
      4  begin
      5          execute immediate
      6  'declare
      7          n       number;
      8  begin
      9          select
     10                  1 into n
     11          from dual
     12          where :var1 = 61;       --// var1 is used as IN
     13
     14          :var2 := n * :var1;     --// var2 is used as OUT and var1 as IN
     15          :var2 := -1 * :var2;    --// var2 is used as OUT and IN
     16  end;
     17  '
     18          using
     19                  in out id, in out cnt;  --// must reflect usage above
     20
     21          DBMS_OUTPUT.put_line ( 'cnt='||cnt || ' id=' || id);
     22  end;
     23  /
    
    Procedure created.
    
    SQL>
    SQL> exec FooProc
    cnt=-61 id=61
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    
  • How can I programattically comment value a variable?

    I created programmatically using PropertyObject.NewSubProperty variables.  I also set the variable window "comment" to describe what is the variable.  I put the other variable elements (name, value, and Type), but I do not see how to set the comment.

    I use TestStand 4.1.1.

    Thank you.

    Set PropertyObject.Comment

  • How to use the environment variable in LAbVIEW

    Hello

    I'm trying to use an environmental variable in the diagram (use this as the path of a file). I can't know how get the value of the variable approx. can you please help this?

    Thank you for your attention.

    JACIE

    Try these.

  • definition of variables in packages and using the same variables in charge Plans as a case statement in Odi

    Hello

    I am trying to use a global variable 'Global.test' in my ODI "pkg_test" package and step declaration type as a variable that is defined with the value 1 when my package evaluates the condition successfully run and with 0 if the fails.now condition I will carry out the same "pkg_test" package in my load "LP_TEST" and using the variable 'Global.test' Plan as a case statement in terms of load "LP_TEST".

    It's workload Odi is unable to understand the value of the variable 'Global.test', which is defined in my pkg 'pkg_test' and my case statement is put down in my care Plan.

    Thank you

    Hi Santosh Pradhan,

    What kind of story do you have in your variable?

    If you have not selected any antecedent, the scope of the variable is limited to the session. As the execution of the package is a session in its own (independent of the workload performance), the value of the variable is not accessible after his execution.

    You can also try assigning / updating of the value of the variable directly from your plan, instead of in the package:

    It will be useful.

    Best regards

    JeromeFr

  • Use of system variables in the configs

    Hello

    I need to build strings using java system variables and place them in tangosol-coherence - override.xml

    I need something like this:

    <init-params>
        <init-param>
            <param-type>java.lang.String</param-type>
            <param-value>${somePath}/coherence/cache-config.xml</param-value>
        </init-param/>
    </init-params>
    

    Can I use a placeholder in the form ${some} to be replaced by the variable system during execution?

    Thank you in advance!

    I assume you mean the system property.

    You should be able to use syntax like this.

    / Home/myaccount/Coherence/cache-config. XML

    Then the system my.own.cache.config set property just to substitute it at runtime, for example, "/ home/otheraccount/coherence/cache-config.xml".

  • Use the bind variable in example of a clause giving questions

    create or replace procedure pr_mbk (p_val in number)
    is
    CROR type is ref cursor;
    REF CROR;
    type numbertype is the table of index number of pls_integer;
    numtype numbertype.
    v_str varchar2 (2000): = 'select empno from emp sample(:val) ";
    Start
    Open ref for v_str using p_val;
    Close ref;
    end;
    /

    Successfully compiled.

    But when I run the same

    Exec pr_mbk (10);

    ERROR on line 1:
    ORA-00933: SQL not correctly completed command.
    ORA-06512: at "SCOTT. PR_MBK', line 9
    ORA-06512: at line 1

    My question is can use us Bind variables within a sample clause.

    Receive your answer.

    Thank you
    Madhu K.

    I guess that SAMPLE is considered as a special case, and is not considered as something that takes a 'value' in the same way as values in where clause or values in the query itself.
    Let's face it, the SAMPLE is not the standard SQL syntax and is probably something Oracle implements in a separate thread for processing SQL itself i.e. engine Oracle saying to herself... "I will remember this bit of the sample until I questioned the data using the SQL engine, so I'll take a suitable sample of the results," but it's the SQL engine treats the binding of values and the Oracle process that awaits the results taste, knows nothing of the binding values in it's special EXAMPLE of keyword.

  • Impossible to filter a recordset using a session variable

    I have a voluntary application page, then when volunteers press < Submit > their info is stored in a MySQl db table and a session variable is created containing the primary key of the record in the table, control is passed to a page of 'success' The success page accesses the session variable (I proved this by displaying the session on the success page variable) so my next step was to create a recordset in the success with a filter page using the session variable to select the appropriate line in the table, allowing me to view the volunteer to the info They argued.

    I created a page to pass the test that displays the session variable and a field of the volunteer info. When I test this I can't see the session variable is displayed, but the corresponding volunteer info of the recordset field is not displayed.

    The volunteer application page is here www.hollisterairshow.com/volunteerapp.php and the successpage is here www.hollisterairshow.com/thanksvol.php

    The code that creates the session variable in the voluntary application page is displayed below

    $_SESSION ['volunteer_id'] = mysql_insert_id();

    The code to display the session variable in the success page is shown below

    <? PHP echo $_SESSION ['volunteer_id'];? >

    The code to display the volunteer info is shown below

    Thank you < h1 > <? PHP echo $row_rsVolunteerApp ["FirstName"];? >! < / h1 >

    The recordset definition is shown below

    rsVolunteerApp.jpg

    The result of the test success page is shown below, as you can see the name of the volunteers is not displayed immediately after the "Thank you" message, but the session variable containing the correct primary key (41) is displayed correctly.

    sessiontest.jpg

    Someone has an idea what I am doing wrong?

    Thank you

    Tony

    Where did you put session_start()? It should be before the variable is accessible. This is obviously before the line that displays the value in your page, but that's before the SQL query is generated?

    Also, have you checked in phpMyAdmin to see if volunteernumber 41A all values in the database?

  • What is the correct syntax for the use of a variable in an ad-hoc query?

    Hi all

    I'm a casual user of the DB and right now need to update the records about 1000 + so that a certain column gets a unique value.

    So I thought I'd use a variable for this.

    Then, I built this type of SQL statement for only a small subset of records:
    ----------
    variable number recNumber;
    exec: recNumber: = 1;
    UPDATE TABLE_TO_BE_UPD
    SET COL_TO_BE_UPD = COL_TO_BE_UPD + recNumber
    WHERE COL_TO_BE_UPD IN ('VAL_A', 'VAL_B');
    ----------

    I get invalid SQL statement error when you try to run above (except for the guest who asks for a value I want to omit).

    In any case, I also tried this one:
    ----------
    CREATE SEQUENCE seqCounter;
    UPDATE TABLE_TO_BE_UPD
    SET COL_TO_BE_UPD = COL_TO_BE_UPD + seqCounter.NEXTVAL
    WHERE COL_TO_BE_UPD IN ('VAL_A', 'VAL_B');
    ----------

    Of it, I got the error ORA-01722: invalid number... I guess it's because seqCounter is of type number and the COL_TO_BE_UPD is of type character... (?)

    Then I want to ask is what is the correct way to define and use a counter variable type to add a number at the end of a string?

    Also another question I would ask is that are variables that are used in queries ad hoc, also called "bind variables"?

    Thank you muchly

    If you want to add a unique number to a column, then it would be:

    UPDATE TABLE_TO_BE_UPD
    SET COL_TO_BE_UPD = COL_TO_BE_UPD ||to_char(rownum)
    WHERE COL_TO_BE_UPD IN ('VAL_A','VAL_B');
    
  • How to send different value of variable presentation in URL GO?

    Hello
    I use GO URL to send presentation Variable (d_pv) to filter the other report on column 'day '...

    "(a href = http://server/analytics/saw.dll?GO & path=/shared/BI%20Reports/Ki1/KPIs%20Detail%20Priority%203%20Shipped & Action = Navigate & p0 = 1 & p2 & p1 = eq ="Time". Day & p3=@{d_pv}) SHIPPED (/a)'


    It works very well. But my goal is to filter the report by using the eve of the value of d_pv (for example. If the value of d_pv is ' 2010-04-27', I need to filter the others using report "(2010-04-26')"

    I couldn't find to spend one day back value of presentation using variables go url.

    Help, please...

    Published by: bob123 on April 28, 2010 10:15

    I would say use TIMESTAMPADD(SQL_TSI_DAY,...,1) and use spend your variable in this column.

    When you spend the day report 28/04/2010 + 1 column target, it will display the 27/04/2010 data.

  • How can I use the Session variable in the repeat region

    I have a session variable assigned to the #(numérotation automatique dans access db) of the posts ID. The variable is set to the recordset object that is displayed first (sort by message ID descending). I would like to find a way to make the variable to assign to all records, if the variable is passed to the delete page. If I use a URL parameter to send the message ID, then someone could change the number in a browser and delete messages not intended for the user.
    If you want to see the example in action goto link at the bottom of the message. Save it and reply links are URL parameters response uses the variable MM_Username to enter the name of the sender for a URL parameter is OK, but click on save and then change the value of msdID in the browser for a different number and you can record and display another message not intended for your login id. The link delete uses a session variable that I posted in the Recordset as the auto access number msdID and the good msdID # do not are they assigned.
    What to hide the URL parameters, it would be simple, but how can I do?
    Thank you
    MikeL7
    PAGE WITH SESSION VARIALBE to DELETE PAGE (save and the response are URL parameters)
    http://www.gohbcc.com/callcenter/EmployeeMessagesVIEW2.asp
    USER name: admin PASSWORD: 1234

    links from other pages of my site will bring to:
    http://www.gohbcc.com/callcenter/EmployeeMessagesVIEW.asp it's the settings of all THE URL enter 2 after VIEW to use session variables

    Your message forced me to find a way to make it work, I put the code to create the variable just before the repeating table in the region and went on to form buttons that post the variable and labeled buttons and it works perfectly. Thank you

  • How to use a substitution variable in a rule of load?

    I need to use a substitution variable in a rule of load in a column, I will receive a parameter to correct the month and year of the values in the loading data, could someone tell me if this is possible. I put an expression '& Yearproc' in the value column, but it does not work.

    If you are a member of the WORLD (or even if not, you can register for free associate membership) you can download the presentation from Glenn since 2009 Kaleidoscope "little used Essbase features (such as data mining and triggers) ' - there is a section to this presentation on the substitution variables - it does a great job showing how it works.

    Go to: www.odtug.com, and then Tech, then Essbase/Hyperion resources and search for Schwartzberg. It is currently the ninth presentation on the list - I think that this change based on the popularity of downloads.

    Kind regards

    Cameron Lackpour

  • How to store the values of variable level OBIEE presentation in DB

    Hi all!

    We have a command prompt of dashboard which is set up to store values in variables of presentation (period start and period end dates). Is there a way to store values selected from a database? for further processing?
    that is, I need to pass the variable level (report parameters) presentation to complex calculations to a PL/SQL function.
    Also my requirement might be solved if I can get access to the selected values of logical column in the tab 'Business Model and mapping' definition in the BI administrator.
    that is, I'll be able to define the logical column using VALUEOF (NQ_SESSION. < nom_var >)

    Kind regards
    Mr.Maverick

    Hello.

    1 do SQL PL/function (in the database) which has an input parameters, which number depends on number of guests and in it you'll insert these parameters into a table.

    2. your report in column expression answers call this function that will do insert, the code would be like:
    EVALUATE ("YOUR_FUNCTION (1%, 2%, 3%, 4%) (' as varchar (20), @{p_1}, @{p_2}, @{p_3}, @{p_4})

    3. Note that the function returns something and be careful on data types inside EVALUATE it.

    4. notes that, in the case where some messages are not selected (all or nothing) you recognize this case as:

    -case when LENGTH('@{pv_var}') > 0 then ' @{pv_var}' end else' all '.

    or like this:

    -case when LENGTH('@{pv_var}') is null then 'all choice"other" @{pv_var}' end; "

    Kind regards
    Goran
    http://108obiee.blogspot.com

Maybe you are looking for

  • How can I apply for if I'm in Dominican Republic for 1 week?

    How can I apply for if I'm in the Dominican Republic for a week and I want to call landlines USA?

  • Addition of autofocus and the depth to the measuring Microscope

    Hello This is my first post and I consider myself a newbie with LabView, but I hope I can get some answers.  Here it goes. I have a measuring microscope with X & Y steps thanks to the drive motors.  The Assembly of camera and the objective of the CCD

  • Cannot find drivers Pavilion G6-1001sa

    I have G6-1001sa a friend with me, and I try to find the drivers for it (Windows 7, I think that 64-bit, not sure). I'm sure that the hard drive has been cooked (I ran the diagnostic test and it says error 305 or something). I want to reformat and tr

  • 1400 series 802. 11 a bridge with Catalyst 3524 switch?

    According to the documentation below, "you cannot provide redundant power to 1100 and 1200 access points with the two power DC to its port and inline power from a patch panel or powered switch to the access point Ethernet port'. How about the 1400 se

  • G60-231WM system recovery problems

    HP Pavilion dv5-1125nr Windown Vista 64-bit I sell my laptop to a family member and have wiped my hard drive and tries to perform a system recovery. When executing the partitian recovery, I get all the way to a screen that says that it is to install