Email selected records

hi all,
i'm having a problem with one of my tasks. i was asked to create a page that returns a number of records resulting from a dynamic query. i did this using the sql report that uses PL/SQL Function Returning a SQL Query. this was fine but then i was asked to create an option to send an email depending on which records were selected. i can do this using a tabular form because i can use a row selector. problem is that tabular forms do not allow PL/SQL Function Returning an SQL Query which is required since my SQL is dynamic.
is there any other way i can do this?
thanks
allen

Hi Allen,
You can include a checkbox in the SQL statement. Something like:
DECLARE
Q VARCHAR2(4000);
BEGIN
Q := 'SELECT APEX_ITEM.CHECKBOX(1,empno) "SELECT", EMPNO, ENAME FROM EMP';
RETURN Q;
END;
Andy

Similar Messages

  • How check if selected record already locked?

    Hi everybody,
    Please, how can I check if selected record(s) already locked by another user
    to prevent Oracle error.
    Thank you.
    Dmitry

    Great question. You can use a product called CleanEnter to prevent duplicates being created for Contacts (or Accounts or Leads) by checking against ANY field you wish including the Custom field you are mentioning.
    To learn more about CleanEnter, go to http://www.activeprime.com/cleanenter/
    Happy to discuss if you would like.
    Cheers,
    Greg
    [email protected]
    617-247-9908 x21

  • Is there any provision to view the selected record using SYS_REFCURSOR?

    hi friends ,
    I was using SQL Server . now i am shifting to Oracle . so we are changing the Stored Procedures in SQLServer to Oracle SP's. I have given the structure of procedure given below . If possible , i want to see the output of select statement in the TOAD editor . If any body knows please help me
    CREATE OR REPLACE PROCEDURE PS_AON
    P_STATUS OUT VARCHAR2,
    P_CUR OUT SYS_REFCURSOR
    AS
    BEGIN
    OPEN P_CUR FOR
              select colum1,column2,column3 from Table 1;
    EXCEPTION
                   WHEN OTHERS THEN
                   P_STATUS:=SQLERRM;
    END;
    This is one of the model of stored procedures i am using . And the editor i am using is TOAD 7.3.0 and oracle 9i. Is there any provision to view the selected records by running this procedure in TOAD editor
    thanks & regards

    (assuming you have relatively recent version of TOAD).
    Write a small block to call the procedure (or use Toad's 'execute procedure' option) as in the example below. Note the ':' in front of 'v_cur_out'. When you run the block, TOAD will prompt you for a value / datatype for 'v_cur_out'. Ignore the value, set the datatype to 'Cursor' and click OK. The resultset (if any) will be displayed in the Data Grid window below.
    DECLARE
       v_status VARCHAR2 (32767);
    BEGIN
       ps_aon (v_status, :v_cur_out);
       DBMS_OUTPUT.PUT_LINE ('v_status => ' || v_status);
    END;
    /

  • How to get selected record details when single selection is used in a table

    Hi All,
    Inside a query region I have created a table using region wizard,for this table I have added a singleSelection Item. What I want is , on selection of a particular record i want to update or view that record in a new page , for this I have added update and view icons in each row.
    But I am unable to get the particular selected record
    OATableBean tableBean = (OATableBean)webBean.findChildRecursive("ResultTableRN");
    OASingleSelectionBean singleSelection = (OASingleSelectionBean)tableBean.getTableSelection();
    For this singleSelection object I was unable to find any method which will give the value of the view attribute associated with it.
    Anybody any suggestions regarding it ?
    Thanks in advance,
    Anant NImbalkar.

    Hi Anant,
    here is how you have to do it
    1) you need to enable PPR on that Singl selection , by changining the Action type =fireAction.
    2) define the envent , EVENT
    3) define paramters for that event. This is place that gives you handle to the Attribute of VO.
    So you can define paremters such
    Name = PARAM1
    value =${oa.EqxContactPrivEOVO1.ContactPrivilegeId}
    You can define as many paramters as you can for the vo field that u wanted to have.
    Now in the procesformRequest() , all you do it handle the event EVENT and get the parameters
    if ("EVENT".equals(pageContext.getParameter(EVENT_PARAM)))
    String accountid= pageContext.getParameter("PARAM1");
    You can refer developer guide for further details.

  • I try to find something on my iPad, many results are emails, when I push on an email I can't see the email, because I get ever the first email,or the previous selected email in my inbox. How can I see the email selected?

    I try to find something on my iPad, many results are emails, when I push on an email I can't see the email, because I get ever the first email,or the previous selected email in my inbox. How can I see the email selected?

    Is your Yahoo account set up as POP3 or IMAP?

  • WHERE ... IN ... SELECT records for a given list of PKs (or FKs)

    Hello folks,
    Many times we need to retrieve records for given lists of PKs (or FKs), as:
    p_pk_list := '11,22,33';
    We work in 10g
    A co-worker of mine had a good idea (I thought) to "help" the optimizer and build a recordset in the FROM clause and use it later in WHERE
    SELECT ...
    FROM tableName a,
    (SELECT REGEXP_SUBSTR(p_pk_list, '[^,]+',1,ROWNUM) p_pk_id
    FROM dual
    CONNECT BY ROWNUM <= LENGTH(p_pk_list ) - LENGTH(REPLACE(p_pk_list ,','))) d_pk
    WHERE
    a.ID=d_pk.p_pk_id; -- (1)
    The tragedy is that it takes 4 seconds to retrieve 5 records from the table (no other joins). The table has about 40 columns though and there are about 51000 records. With the SELECT REGEXP_SUBSTR in the WHERE clause, it's a bit worse.
    If (1) is replaced by:
    a.ID IN (11,22,33,44,55);
    the execution takes 0.04 seconds.
    My questions are:
    1. Is this a bad idea to select records for a given list of PKs or FKs? Should one just go for one PK/FK instead?
    2. Why the stiff performance penalty?
    3. Ideally, it would be nice if this would work:
    a.ID IN (p_array);
    where p_array would be an array of integers
    Any elegant sollutions?
    Thanks a lot.
    Dan

    Check the explain plan for both statements.
    I would wager that the overhead you experience is due to the fact that you are comparing apples to oranges here.
    (SELECT REGEXP_SUBSTR(p_pk_list, '[^,]+',1,ROWNUM) p_pk_id
    FROM dual
    CONNECT BY ROWNUM <= LENGTH(p_pk_list ) - LENGTH(REPLACE(p_pk_list ,','))) d_pkreturns a string.
    a.ID IN (11,22,33,44,55);Is a list of numbers.
    If you check the explain plan for the regexp version, you should see an implicit conversion being done for you (converting the number column into a string for comparison) which means you can't use any indexes defined on a.id.
    If you want to use an array of numbers here's an approach using a built in array of numbers.
    declare
       v_number_list  sys.odcinumberlist   default sys.odcinumberlist();
    begin
       v_number_list.extend;
       v_number_list(v_number_list.count) := 100;
       v_number_list.extend;
       v_number_list(v_number_list.count) := 200;
       for vals in
          select *
          from all_objects
          where object_id in
             select column_value
             from table(cast(v_number_list as sys.odcinumberlist))
       loop
          dbms_output.put_line(vals.object_name);
       end loop;
    end;
    25  /
    I_TYPED_VIEW1
    I_NTAB2
    PL/SQL procedure successfully completed.
    ME_XE?Otherwise do an explicit TO_NUMBER on the regexp query so that you can use any indexes defined on the table in question.

  • How to select records in ALV using FM

    Hi guys,
    How to select records in ALV using FM. Not the OO method. Thx in advance!
    Kun

    hI
    by using REUSE_ALV_FIELDCATALOUG_MERGE. Iys fill field catalouge table as per internal table description. Then use REUSE_ALV_GRID_DISPLAY for display ALV REPORT.
    **Please reward suitable points***
    With Regards
    Navin Khedikar

  • How to edit the selected record through a popup page

    Hi, can anyone help me to handle the case ?
    1) In main page, there is a datatable showing the record list. Click a commandLink in the selected record to popup a screen for user edit.
    2) The data is validated and then saved into database after clicking the submit button in the popup.
    3) Finally, the main page is refreshed with the latest record list.
    Thanks

    Just like any other servlet or form-processing script. What would a mere HTML page know about "systems"? Put the URL into the form destination attribute and be done.

  • Performance problem with selecting records from BSEG and KONV

    Hi,
    I am having performance problem while  selecting records from BSEG and KONV table. As these two tables have large amount of data , they are taking lot of time . Can anyone help me in improving the performance . Thanks in advance .
    Regards,
    Prashant

    Hi,
    Some steps to improve performance
    SOME STEPS USED TO IMPROVE UR PERFORMANCE:
    1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
    4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    5. Avoid using nested SELECT statement SELECT within LOOPs.
    6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
    7. Avoid using SELECT * and Select only the required fields from the table.
    8. Avoid nested loops when working with large internal tables.
    9. Use assign instead of into in LOOPs for table types with large work areas
    10. When in doubt call transaction SE30 and use the examples and check your code
    11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
    12. Use "CHECK" instead of IF/ENDIF whenever possible.
    13. Use "CASE" instead of IF/ENDIF whenever possible.
    14. Use "MOVE" with individual variable/field moves instead of "MOVE-
    CORRESPONDING" creates more coding but is more effcient.

  • JSF - Problem in Retrieving selected record from datatable

    I am new to JSF and in the process of developing a new web application using JSF.
    I have problem in retrieving the selected record from a datatable. I am using h:datatable tag and h:commandlink in a column for selecting a particular row on the datatable.
    I have populated the data to the datatable by binding a bean and its property.
    When I retrieve also I am binding to a bean in the action attribute of the h:commandlink tag in h:column of that datatable.But when I try to bind the bindign attribute of the h:datatable tag to the datatable instance in my Bean , my JSF File gets corrupted..
    How to implement this without any issue??plz help me regarding this.

    HI
    Try the below code
    DATA lo_nd_del TYPE REF TO if_wd_context_node.
    DATA lo_el_del TYPE REF TO if_wd_context_element.
    DATA ls_del TYPE wd_this->Element_del.
    DATA lo_nd_et_postab_1 TYPE REF TO if_wd_context_node.
    DATA lo_el_et_postab_1 TYPE REF TO if_wd_context_element.
    DATA ls_et_postab_1 TYPE wd_this->Element_del.
    DATA lt_et_postab_1 TYPE wd_this->Elements_del.
    DATA: wa_temp TYPE REF TO if_wd_context_element,
    lt_temp TYPE wdr_context_element_set.
    * navigate from <CONTEXT> to <ET_POSTAB_1> via lead selection
    lo_nd_et_postab_1 = wd_context->path_get_node( path = `ZSHP_EXTENDED_DUE_LI.CHANGING_3.ET_POSTAB_1` ).
    CALL METHOD lo_nd_et_postab_1->get_selected_elements
    RECEIVING
    set = lt_temp.
    * navigate from <CONTEXT> to <DEL> via lead selection
    lo_nd_et_postab_1 = wd_context->get_child_node( name = wd_this->wdctx_del ).
    LOOP AT lt_temp INTO wa_temp.
    CALL METHOD wa_temp->get_static_attributes
    IMPORTING
    static_attributes = ls_et_postab_1.
    ls_et_postab_1-vbeln = del. // adding new attribute value.
    APPEND ls_et_postab_1 TO lt_et_postab_1.
    CLEAR ls_et_postab_1.
    ENDLOOP.
    lo_nd_et_postab_1->bind_table( new_items = lt_et_postab_1 ).

  • Can we enable "Select record Set Message choice" of Table in left side

    Hi ,
    I have requirement to set the "Select Record Set " Message choice of a table region on left side.
    Ex:If there are more records in a table region and message choice available to select next set of records.
    You can chk in Workflow Status Monitor function.
    Its the Navigation Bar to be @ left side on the table Region whcih allows you to navigate the records set.
    Thanks,Sarath.
    Edited by: SarathL on Dec 13, 2011 4:59 PM

    Hi,
    Not sure what exactly you are looking for.
    The Next link and option to select next set of rows comes to your OA Table by default .. isn't it?
    -Idris

  • Selecting records from DEFAULT range-list subpartition

    Is it possible to select records which belong to DEFAULT subpartition of a certain partition of a RANGE-LIST partitioned table, using subpartition pruning? Our task assumes creating partitions and subpartitions in a table dynamically before running ETL. But sometimes due to complexity of the path subpartition key goes from staging data to materialized views in data warehouse, we cannot predict all subpartition key values upfront. We can create DEFAULT subpartition for every partition though, and have Oracle place records which don't match any subpartition condition into that subpartition.
    But later we need to split DEFAULT subpartition so that all records will go into their dedicated subpartitions, and DEFAULT will be left empty - other layers of our application need all records to be stored in subpartition other than DEFAULT in order to be available. For that, we need to know which keys are stored in DEFAULT subpartition. And the question is - how can we effectively achieve that?
    The obvious "brute force" approach is to issue a query like:
    select distinct subpart_key from mytable partition (myrangepartition) where not subpart_key in (list of all subpartition key values for this partition)
    but it does not use partition pruning - I have checked execution plan. While it is possible to use only DEFAULT partition, this query will iterate through all subpartitions, which is huge performance impact. How can we instruct Oracle to use only DEFAULT subpartition?

    is the solution. I have overlooked this syntax - now my life is much easier.

  • Selecting records based on formula fields

    Post Author: Mike Kennedy
    CA Forum: Formula
    I have created a field (called "Shortage") that is the result of subtracting two running totals and have inserted all three fields into the group footer.  I only want to select those records that have a negative value as a result, but the field is not shown in the Select Expert.  None of my formula fields show up in the Select Expert for some reason (normally they do).  Does anyone know why and how can I select these records only?  Thanks.

    Post Author: SKodidine
    CA Forum: Formula
    Running Totals are only available once the records are being read and processed.  You are calculating the difference between two Running Totals and then want to use that to select records?  I don't think that is possible.  One way of accomplishing the display of groups which have a negative value is to use sum functions instead of the running totals and then in group selection criteria, display only those groups which have a negative value as a result of subtracting the two sums.

  • Selecting records based on different fields

    Post Author: timg
    CA Forum: General
    I have three groups which I study quite often, the blues (as identified in field 1with codes), the reds (identified in field 2 with codes), and the greens (identified in field 3 with certain codes).
    I want to be able to run one report which, through a parameter field, I can select the group (red, green, or blue) for which I can select records from the database and analyze. Stated another way, if I select "Blue" in the parameter field, how can I get CR to pull certain records in the correct field with the correct codes.

    Post Author: yangster
    CA Forum: General
    dunno what your codes are but something like this will work if you put it in the section expertif ?para = "BLUE" then field1 in &#91;a, b, c&#93; elseif ?para = "RED" then field2 in &#91;d, e, f&#93; elseif ?para = "GREEN" then field3 in &#91;g, h, i&#93; 

  • Select Recording Source issue on Audigy 2

    I unistalled and installed the program and can't get it to work. I have the Audigy 2 ZS plat. with the software and all. Problem I have when I open up the Organizer MediaSource Player everything works but the "select recording source" button or selection doesn't work. It's kind of blanked out as if I don't have that option at all. But when I go to the mixer I can here the line inputs but I can't record from it b/c I can't select it. If anyone has this issues let me know or how to solve it. I have windows XP and also my Audio Stream recorder doesn't work either.

    Ok I got it to work. This is the reply I got from Creative but I didn't remove the program from the add/remove option on the PC b/c that didn't work at first. I inserted the installation CD and remove it from that wizard. Rebooted and the PC found new hardware. I then installed the driver and software from the CD and now it works.
    For Mediasource. It appears something was corrupted in Mediasource or there is a conflict within the system.Please uninstall all software and drivers for the soundcard, from add/remove programs. Once this is done, shut down the system and changePCI slots for the soundcard, then turn the system back on, cancel the found new hardware wizard, disable all background applications (especially virus scanner, firewall, and any other background applications running in the bottom right hand corner of the system), andthen perform a full reinstallation of the drivers and software from the soundcard installation cd.
    CAT I hope you fix your sound card. Good luck.

Maybe you are looking for

  • Resolution questions

    Info: We use a Kramer 719 switcher/scaler, Toshiba 2800 DVD player and a computer with the same output resolution as the Kramer 719 (1024x768). Can I (and should I) increase resolution of a FC3 project if I'm playing it from the DVD player? What abou

  • [PATCH] Fix find()/count() lookups on dbstl set/map

    Applies to 5.2.36 Fix find()/count() lookups on dbstl set/map A bug was discovered that manifests when a custom marshaller is in use for objects serving as a key for either a db_map, or the item in a db_set. It may affect other subsystems (multimap/s

  • Simple SQl statement help needed!!!

    New to SQL..Please can you advice where is the problem.. select file_id, a.file_name, a.sum(bytes/1024/1024) Used_space, b.sum(bytes/1024 /1024) Free_space from dba_data_files a, dba_free_space b where tablespace_name ='DATA_TS' OR tablespace_name='I

  • Core audio and sample rate conversion

    I would like to know how to take manual control over core audio regarding sample rate destruct... er conversion. First - I know the workarounds - simply closing the audio player of choice, resetting the external hardware and relaunching the audio pla

  • Backup import goes to subfolder by date

    I have a backup system where I import pictures to two identical folder trees on different hard drives.  The primary import goes just fine into the folder I specified.  The secondary import goes into the correct folder on the second hard drive, but it