Querying Leads based on checkbox value

Hi I want to retrieve all the Leads based on my cpo_modified checkbox field.
I'm using this to do it:
objListOfLead = LeadHelper.createListOfLead(strLeadDim);
objListOfLead[0].cpo_modified = "Y";
//Campos de la entidad Lead a devolver
objListOfLead[0].Country = "";
objListOfLead[0].cpo_atInstallments = "";
objListOfLead[0].cpo_atProfit = "";
objListOfLead[0].cpo_atProfit_percent = "";
(and some more, all empty too)
objQryOutput = queryLeads(objListOfLead, mySession, false);
But I've been unable to get what I want. I'm getting allways the same error:
El campo 'ZBool_10' de la instancia del componente de integraci??n 'Lead' contiene una expresi??n de consulta no v??lida: 'Y'(SBL-EAI-13002)
Any of you knows how to filter a query based on a checkbox value? Should I use "Y"or "1" or "true" perhaps???....I've tried many times with different expressions but all of them has been unsuccesfull to me...some ideas?
Thank you very much!
Noël

Great Michael! The expression you suggested ='Y'" worked perfectly!
Thank you VERY MUCH!
But, why those kind of ¿tricks? are not well documented by Oracle? I've lost a great amount of time (been the first time I work over OnDemand) and that's a thing I really hate...
My most sincerely thanks Michael!
Noël

Similar Messages

  • Sub Query selection based on parameter value selected

    I have a parameter, and based on the value selected, I want to run one of two queries. I thought I could do either an IF THEN ELSE, or a CASE, but neither seem to be working.
    What I'm trying to do is this:
    IF parameter_value = 338 THEN
    (RUN THIS SELECT QUERY)
    ELSE
    (RUN THIS SELECT QUERY)
    END IF
    or
    SELECT CASE WHEN parameter_value = 338 THEN (RUN THIS SELECT QUERY)
    ELSE (RUN THIS SELECT QUERY)
    END X
    I'm getting errors with both. For the CASE statement, it says "too many values". For the IF statement, it just says "invalid SQL statement".
    Any suggestions would be appreciated.
    Thanks.

    Looks like this is what you want
    SQL> WITH T
      2       AS (SELECT LEVEL col
      3             FROM DUAL
      4           CONNECT BY LEVEL <= 5)
      5  SELECT *
      6    FROM T;
           COL
             1
             2
             3
             4
             5
    SQL>
    SQL> VARIABLE parameter_value    NUMBER
    SQL> EXEC    :parameter_value := 338;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> WITH T
      2       AS (SELECT LEVEL col
      3             FROM DUAL
      4           CONNECT BY LEVEL <= 5)
      5  SELECT col
      6    FROM T
      7   WHERE col = DECODE (:parameter_value, 338, col, :parameter_value);  --- If 338 then select all if not 338 select only the one with parameter_value.
           COL
             1
             2
             3
             4
             5
    SQL>
    SQL> EXEC :parameter_value := 2;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> WITH T
      2       AS (SELECT LEVEL col
      3             FROM DUAL
      4           CONNECT BY LEVEL <= 5)
      5  SELECT col
      6    FROM T
      7   WHERE col = DECODE (:parameter_value, 338, col, :parameter_value);
           COL
             2
    SQL>
    SQL> EXEC :parameter_value := 3;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> WITH T
      2       AS (SELECT LEVEL col
      3             FROM DUAL
      4           CONNECT BY LEVEL <= 5)
      5  SELECT col
      6    FROM T
      7   WHERE col = DECODE (:parameter_value, 338, col, :parameter_value);
           COL
             3
    SQL> You need to use following where clause in your query
    WHERE column_name = DECODE (parameter_value, 338, col, parameter_value); -- replace the column_name with name of the column you are comparing against.G.
    Edited by: G. on Mar 8, 2011 3:36 PM
    formatted and added comments

  • Query performance based on condition value

    Hi,
    I have a simple query which is actually on a view dwdb_dba.actl_partinfo_cust. Please see query bellow
    select * from dwdb_dba.actl_partinfo_cust WHERE insertdatetime=(select max(insertdatetime)
    from dwdb_dba.actl_partinfo_cust Where system_source='UTS') AND SUPPLIERID='CG1' and Custdevice in ('BT-M2789-C')This query is taking very very long time to return (around 30 records) but if i u
    Here if i change the condition "AND SUPPLIERID='CG1'" to "AND SUPPLIERID='DUMMY'", it returns within 3 seconds. Execution plan is same for both then why one query taking too much time and other returning so fast and how can i tune the query against the condition AND SUPPLIERID='CG1' so that it can also return within 3 seconds.
    I actualy dont understand the behaviour
    PLAN_TABLE_OUTPUT
    Plan hash value: 3622663398
    | Id  | Operation                       | Name                        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                |                             |    10 | 42790 |   152K  (6)| 00:00:59 |
    |*  1 |  VIEW                           | ACTL_PARTINFO_CUST          |    10 | 42790 | 59972   (4)| 00:00:23 |
    |   2 |   UNION-ALL                     |                             |       |       |            |       |
    |*  3 |    TABLE ACCESS BY INDEX ROWID  | ACTL_PARTINFO_CUST_UTS      |     9 |  3429 | 59968   (4)| 00:00:23 |
    |*  4 |     INDEX RANGE SCAN            | ACTL_PART_CUST_UTS_IDX3     |   420K|       |  1462  (11)| 00:00:01 |
    |*  5 |    TABLE ACCESS BY INDEX ROWID  | ACTL_PARTINFO_CUST_PROMIS_4 |     1 |   311 |     4   (0)| 00:00:01 |
    |*  6 |     INDEX RANGE SCAN            | ACTL_PARTINFO_CUST_4_IDX1   |     1 |       |     3   (0)| 00:00:01 |
    |   7 |   SORT AGGREGATE                |                             |     1 |    14 |            |       |
    |   8 |    VIEW                         | ACTL_PARTINFO_CUST          |  1363K|    18M| 92040   (8)| 00:00:36 |
    |   9 |     UNION-ALL                   |                             |       |       |            |       |
    |* 10 |      TABLE ACCESS BY INDEX ROWID| ACTL_PARTINFO_CUST_UTS      |  1363K|    33M| 92036   (8)| 00:00:36 |
    |* 11 |       INDEX RANGE SCAN          | ACTL_PART_CUST_UTS_IDX1     |  1481K|       |  5528  (10)| 00:00:03 |
    |* 12 |      TABLE ACCESS BY INDEX ROWID| ACTL_PARTINFO_CUST_PROMIS_4 |     1 |    15 |     4   (0)| 00:00:01 |
    |* 13 |       INDEX RANGE SCAN          | ACTL_PARTINFO_CUST_4_IDX1   |     1 |       |     3   (0)| 00:00:01 |
    ---------------------------------------------------------------------------------------------------------------Thanks

    Salman Qureshi wrote:
    This query is taking very very long time to return (around 30 records) but if i u
    Here if i change the condition "AND SUPPLIERID='CG1'" to "AND SUPPLIERID='DUMMY'", it returns within 3 seconds.
    My developer has changed the code of the view which was involved and not it is working fine but still i m curious to know that what could be the reason of this. Same execution plan but only condition value is different. One value returns some rows but returns within few seconds and other condition also returns a few rows but may hours.Salman,
    A bit more details would help diagnose the root cause.
    If you are still interested in diagnosing the root cause, you may want to provide complete EXPLAIN PLAN output, along with predicate section. If you are on 10g, you may want to provide the output of DBMS_XPLAN.DISPLAY_CURSOR which will show the actual plan used along with actual number of records generated by each step in the execution plan.
    It is possible that SUPPLIERID column data is skewed so that there are less records in table for the value 'DUMMY' but much more number of records for the value 'CG1'. This predicate combined with the other predicate on CUSTDEVICE column may have been resulting in similar number of rows the final query returns.
    It is possible that the predicate on CUSTDEVICE is being applied at different stage in the plan than the predicate on SUPPLIERID column.
    Edited by: user503699 on Aug 3, 2010 3:11 PM

  • RE: Swapping two query views based on filter value

    Hi Can anyone tell me how do I swap between two query views for a web item based on one filter selection.
    Thanks in advance
    Message was edited by:
            Chandra Hasa Reddy Samala

    Hi,
    If you want to copy list item with Person column to another list, here are two solutions for your reference:
    1.Use SharePoint Designer workflow to create item in another list when there is item added in the current list, there is a workflow action “Create List Item”
    will meet your requirement. The string in Person column will still be a hyperlink in the other list and you can apply filter on it.
    Workflow actions quick reference
    http://msdn.microsoft.com/en-us/library/office/jj164026(v=office.15).aspx
    2.Use JavaScript Client Object Model to copy item to other list, you can put the script into a Content Editor Web Part.
    JavaScript Client Object Model
    http://msdn.microsoft.com/en-us/library/office/hh185006(v=office.14).aspx
    More information about
    using JavaScript Client Object Model to retrieve and create/update list item:
    http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • Acrobat Pro 9: Calculating Based on Checkbox Value

    Hi!
    I am a novice and I purchased Adobe Acrobat Pro 9. Can
    someone help me figure out how to do calculations of checkboxes? I
    am trying to do the following:
    I want to create 2 columns of 10 check boxes each. I want to
    keep a running total of how many are checked in Column 1 and a
    running total of how many are checked TOTAL (in both columns). Now,
    the document has 3 pages, and on each pages - there are 2 columns
    of 10 check boxes. I want the running total to include all boxes
    from the 3 pages.
    I hired a freelancer who did this in LiveCycle (using Acrobat
    Pro 8). It worked on her blank page, but when we copied and pasted
    the check boxes into my document (a pre-made PDF exam I have to use
    for work; my school would not allow me to give it to her to work
    with); the calculations wouldn't work. We went into LiveCycle and
    each time we opened up my document with her calculations, the
    language changed automatically from FormCalc to JavaScript.
    Can anyone give me advice or tell me what to do? (We do have
    two read only boxes that do calulations [total checked in Column 1
    and total checked] so it really should work...)
    Thank you for considering and taking the time out to help!
    Alisa

    Hello,
    I'm sorry I'm not able to address your question. These forums
    are specific to the
    Acrobat.com website and its set of hosted services, and do
    not cover the Acrobat family of desktop products.
    Any questions related to the Acrobat family of desktop
    products would be best suited in the Acrobat User Forums:
    Link to
    Acrobat Forums
    Thanks!
    Michelle

  • Conditional Link based on Checkbox value

    I have a report where I have dynamically created a checkbox via HTMLDB_ITEM.CHECKBOX. I also have an edit link on each record.
    The functionality that I need is, if the checkbox is unchecked then the link is active. If the checkbox is checked the link is inactive or when selected gives an alert and doesn't navigate to the edit page.
    How can I do this

    You mean like this? http://apex.oracle.com/pls/otn/f?p=43865:13
    To achieve this I included a javascript function in the page's HTML Header as follows:
    <script language="javascript">
    function editIfChecked(idToCheck) {
    if (document.getElementById('chk' + idToCheck).checked == true)
    {redirect('f?p=&APP_ID.:14:&SESSION.::::P14_EMPNO:'+idToCheck);}
    else
    {alert('Sorry, Chief. You cannot edit this until you check the box.');}
    </script>
    Then change the edit link in your report to link to a URL like: javascript:editIfChecked(#EMPNO#);
    Obviously change #EMPNO# to be the name of whatever unique ID column you're using. You'll need to change the javascript function as well so that it links to the right page in your app (unless it happens to also be page 14) and change the name of the item that is set (unless it happens to be P14_EMPNO).
    Hope that helps,
    Andrew
    Oh and also the argument passed to getElementById will have to be changed to reflect whatever ID you are giving to your checkboxes in your call yo htmldb_item.checkbox. I used this in the example above: htmldb_item.checkbox(1,empno,'id=chk'||empno)

  • Query on DSO, KF value +/- based on flag value in DSO

    Hi Experts,
    I have a query on DSO and it is running fine.
    Current Query output :
    CHAR1 | CHAR2 | KF1
    1111       S            100
    1111       H            100
    I want to put + or - sign for KF based on value of CHAR 2 (Flag) in query output.
    So
    Desired Query output :
    CHAR1 | CHAR2 | KF1
    1111       S            -100
    1111       H             100
    I can Add CHAR3 in DSO and based on CHAR2 value CHAR3 will store +1 or -1. Add it can be used to get + or -Value of KF using CKF.
    But without doing it (CHAR3), can I do it directly at query level ?
    Regards,
    Vinod

    Try this:
    RKF1: KF restricted on S
    RKF2: KF restricted on H
    CKF: (-1)*RKF1 + RKF2
    This should give you what you are looking for.
    Regards,
    Gaurav

  • CAML Query to get specific item in folder based on dropdown value using Javascript client object model

    Hi,
    I am using the Javascript Client object model.
    I have a custom list and a custom document library.
    Custom list contains 2 columns - dlName , dlValue
    The document library contains 2 folders - "folder1" ,  "folder2" and contains some images.
    The image name starts with the "dlValue" available in the custom list
    I am using a visual webpart and using javascript client object model.
    I am trying to achieve the below functionality:
    1) Load a dropdown with the custom list.
    2) set the image based on the value in dropdown.
    I have achieved the first option, I have set the dropdown, but not sure how to query the folder and set the image.
    Below is the code i have used so far:
    //In Visual webpart
    <select id="ddlTest" >
    </select>
    <br/>
    <div id="PreviewLayer">
    <img id="imgPlaceHolder" runat="server" alt="Image" title="imgPlaceHolder" src=" " />
    </div>
    // In Javascript file
    function RenderHtmlOnSuccess() {
    var ddlTest = this.document.getElementById("ddlTest");
    ddlTest.options.length = 0;
    var enumerator = this.customListItems.getEnumerator();
    while (enumerator.moveNext()) {
    var currentItem = enumerator.get_current();
    var dropdownValue = currentItem.get_item("dlValue");
    ddlTest.options[ddlTest.options.length] = new Option(currentItem.get_item("dlName"), dropdownValue);
    setImage(dropdownValue); // Not sure how to query the folder and set the image based on value.
    // Also if dropdown value is changed, corresponding image should be shown
    How to query the folder and based on dropdown value, show the image? Also, how to handle the dropdown value change?
    Thanks

    Hi,
    Here are two links for your reference:
    Example of how to Get Files from a Folder using Ecmascript \ Javascript client object model in SharePoint 2010
    http://sharepointmantra.wordpress.com/2013/10/19/example-of-how-to-get-files-from-a-folder-using-ecmascript-javascript-client-object-model-in-sharepoint-2010/
    SP2010 JSOM Client Object Model: How to get all documents in libraries including all folders recursively
    http://sharepoint.stackexchange.com/questions/70185/sp2010-jsom-client-object-model-how-to-get-all-documents-in-libraries-including
    In SharePoint 2013, we can also use REST API to achieve it.
    http://msdn.microsoft.com/en-us/magazine/dn198245.aspx
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Needs Query to get the cycle time automatically based on the value provided in the UDF on OWOR  table

    Dear all,
    Need a query to get the Cycle time in hr based on the value provide in the udf on OWOR table.
    Details of UDF:-
    1.Start date =10/07/14  (Field Name U_EA_REST)   
    2.Start time =10:00        (Field Name U_EA_REASTARTTIME)
    3.End date =11/07/14    (Field Name U_EA_REET)
    4.End Time=14:00          (Field Name U_EA_REAENDTIME
    Cycle Time=_______      (Field Name U_EA_REACYCLETIME)
    Regards,
    BanugopanRajendran

    Dear all,
    Need a query to get the Cycle time in hr based on the value provide in the udf on OWOR table.
    Details of UDF:-
    1.Start date =10/07/14  (Field Name U_EA_REST)   -  Date Type
    2.Start time =10:00        (Field Name U_EA_REASTARTTIME) - Hour Type
    3.End date =11/07/14    (Field Name U_EA_REET) - Date Type
    4.End Time=14:00          (Field Name U_EA_REAENDTIME - Hour Type
    Cycle Time=_______      (Field Name U_EA_REACYCLETIME) - Hour Type
    Regards,
    BanugopanRajendran

  • How do I change the query based on parameter value

    hi,
    Based on parameter value I want to change my query. If paramter value is 'O' i want the 'order by depno' in query if the value is null i don't want the order by clause.
    How do I achieve this.
    Thanks
    Ram

    U can use lexical parameter
    i.e u create one user parameter and in query
    u use this parameter with &param_name
    ex.
    select val,prize from stock where sr_no > :srno
    orderby &ord_by
    here ord_by is lexical parameter
    and set its intial value to 'sr_no'
    so u can get result order by sr_no
    this parameter is set from form so u will give condition in form and depending
    on condition u will pass this parameter from form.

  • Bex query that returns variable number of columns based upon variable value

    I have a request to create a query that, at excution time, has a variable for 'nbr of months', and based on the value entered by the user, returns data for only the specified number of months. Value that can be entered can vary from 1 to 12. A simple example is, if the user enters 1, then they would only want to see one column, and if they entered 6, then they'd like to see 6 columns in the workbook.  All suggestions on how to implement this dynamic columns on a workbook will be appreciated.
    Thanks.
    BN

    Hi,
    Do this->
    1) first create a New Structure in Rows-> Place your New Selection and drag your KF.
    2) Nw Create a New Formual under this structure. Now Create a Formula variable ( "ZFVXXX")with user-entry and ready for input and dimension as NUmber. and place in formula area. And hide this formula.
    3)Now Create a New Customer-Exit variable on 0CALMONTH name as "ZCECMON" with following atrribute->Mandatory, Range(Interval) and remove check for Ready for entry.
    4)Drag your 0CALMONTH in Rows above That Structure and restrict it to "ZCECMON".
    5) Now go to CMOD and write this code.
    INCLUDE ZXRSRU01 *
    DATA: L_S_RANGE TYPE RSR_S_RANGESID. 'In global area
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT. 'In global area
    DATA: zmonth like /bi0/0calmonth.
    CASE I_VNAM.
    WHEN 'ZCECMON'.
    IF i_step = 2.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZFVXXX'.
    zyear = sy-datum(4).
    zmonth = sy-datum+4(2).
    l_s_range-low = zmonth.
    zmonth = zmonth + loc_var_range-low.
    l_s_range-HIgh = zmonth.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDCASE.
    6) activate the porject and go to rsrt and run there first.
    Regards,
    San!
    Message was edited by: San!

  • How to get the total number of occurrences based on the value of a column.

    Hello everyone,
    This is the first time that I will ask question here on your forum but has been following several threads ever since. I guess that now is my turn to ask a question. So anyway here is the thing, I have a query that should return count the number of rows depending on the value of SLOT. Something like this:
    WIPDATAVALUE          SLOT             N            M
    1-2                   TRALTEST43S1     1            3
    1-2                   TRALTEST43S1     2            3
    3                     TRALTEST43S1     3            3
    4-6                   TRALTEST43S2     1            4
    4-6                   TRALTEST43S2     2            4
    4-6                   TRALTEST43S2     3            4
    7                     TRALTEST43S2     4            4-----
    As you can see above, on the SLOT TRALTEST43S1, there are three occurrences so M (Total number of occurrences) should be three and that column N should count it. Same goes with the SLOT TRALTEST43S2. This is the query that I have so far:
    SELECT DISTINCT
    WIPDATAVALUE, SLOT
    , LEVEL AS n
    , m
    FROM
      SELECT
        WIPDATAVALUE
        , SLOT
        , (dulo - una) + 1 AS m
      FROM
        SELECT
          WIPDATAVALUE
          , SLOT
          , CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, 1, INSTR(wipdatavalue, '-')-1) END AS una
          , CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, INSTR(wipdatavalue, '-') + 1) END AS dulo
        FROM trprinting
        WHERE (containername = :lotID OR SLOT= :lotID) AND WIPDATAVALUE LIKE :wip
    ) CONNECT BY LEVEL <= m
    ORDER BY wipdatavalue;And that it results to something like this:
    WIPDATAVALUE          SLOT             N            M
    1-2                   TRALTEST43S1     1            2
    1-2                   TRALTEST43S1     2            2
    3                     TRALTEST43S1     1            1
    4-6                   TRALTEST43S2     1            3
    4-6                   TRALTEST43S2     2            3
    4-6                   TRALTEST43S2     3            3
    7                     TRALTEST43S2     1            1-----
    I think that my current query is basing its M and N results on WIPDATAVALUE and not the SLOT that is why I get the wrong output. I have also tried to use the WITH Statement and it works well but unfortunately, our system cant accept subquery factoring.
    I know you guys will be helping out because you are all awesome. Thanks everyone
    Edited by: 1001275 on Apr 19, 2013 8:07 PM
    Edited by: 1001275 on Apr 19, 2013 8:18 PM

    Hi,
    Sorry, it's still not clear what you want.
    Are you saying that, given this table:
    CREATE TABLE trprinting
      WIPDATAVALUE       VARCHAR2(255)
    , SLOT               VARCHAR2(255)
    INSERT INTO trprinting (wipdatavalue, slot) VALUES ('1-2',  'TRALTEST43S1');
    INSERT INTO trprinting (wipdatavalue, slot) VALUES ('3',    'TRALTEST43S1');
    INSERT INTO trprinting (wipdatavalue, slot) VALUES ('4-6',  'TRALTEST43S2');
    INSERT INTO trprinting (wipdatavalue, slot) VALUES ('7',    'TRALTEST43S2');you want to produce this output:
    WIPDATAVALUE SLOT                     N          M
    1-2          TRALTEST43S1             1          3
    1-2          TRALTEST43S1             2          3
    3            TRALTEST43S1             3          3
    4-6          TRALTEST43S2             1          4
    4-6          TRALTEST43S2             2          4
    4-6          TRALTEST43S2             3          4
    7            TRALTEST43S2             4          4? If so, here's one way:
    WITH     got_numbers     AS
         SELECT     wipdatavalue
         ,     slot
         ,     TO_NUMBER ( SUBSTR ( wipdatavalue
                               , 1
                           , INSTR ( wipdatavalue || '-'
                                ) - 1
                     )          AS low_number
         ,     TO_NUMBER ( SUBSTR ( wipdatavalue
                               , 1 + INSTR ( wipdatavalue
                     )          AS high_number
         FROM     trprinting
    SELECT       wipdatavalue
    ,       slot
    ,       ROW_NUMBER () OVER ( PARTITION BY  slot
                                 ORDER BY          low_number
                        )                    AS n
    ,       COUNT (*)     OVER ( PARTITION BY  slot )     AS m
    FROM       got_numbers
    CONNECT BY     LEVEL               <= high_number + 1 - low_number
         AND     low_number          = PRIOR low_number
         AND     PRIOR SYS_GUID ()      IS NOT NULL
    ORDER BY  low_number
    ,            n
    ;Much of the complexity here is caused by storing 2 numbers in 1 VARCHAR2 column, wipdatavalue. Relational databases work best when there is no more than 1 item in any given column of any given row. This is so basic to datbase design that it is called First Normal Form. Also, numbers belong in NUMBER columns, not VARCHAR2. If you stored your data like that in the fist place, then you wouldn't need the sub-query I called got_numbers, which is about 60% of the code above. (That could be reduced by replacing SUSTR and INSTR with the less efficient REGEGP_SUBSTR.)

  • Update a table based on Min value of a column of a Another Table.Pls Help.

    Dear All,
    Wishes,
    Actually I need update statement some thing like below scenario...
    Data in table is like below:
    I wrote a query to fetch data like below ( actually scenario is each control number can have single or multiple PO under it ) (i used rank by to find parent to tree like show of data)
    Table: T20
    Control_no        P_no  Col3
    19950021     726473     00
    19950036      731016     00
    19950072     731990     00
                     731990 01
    19950353     734732     00
                     734732 01
    19950406     736189     00
                 736588     01
                 736588     02
                 736588     03                
    Table : T30
    Control_no      P_no              col3
    19950021     726473 
    19950036     731016
    19950072     731990     
                 731990     
    19950353     734732     
                  734732     
    19950406     736189     
                  736588     
                  736588     
                   736588     
      Now requirement is I need to update Table T30's col3 (which do have values in T20 but not this table) in such a way that , It should take MIN (COL3) from T20 and then update that value to related Col3)
    Better I can explain through below new data format in T30 after update:
    After update it should like:
    Table : T30
    Control_no       P_no    col3 (this is updated column)
    19950021     726473   00  -- as this is min value for Pno 726473 belongs to Control NO 199950021 in Table T20 above
    19950036     731016   00  -- as this is min value for Pno 726473 belongs to Control NO 199950021 in Table T20 above
    19950072     731990   00  -- see here..both Pno should updated as '00' as MIN value col3 in Table T20 related to this
                 731990      00     record is '00'  (out of 00,01 it should select 00 and update that value here)
    19950353     734732      00  -- same again both Pno should updated as '00' as MIN value col3 in TableT20 related to this
                 734732      00     record is '00'  (out of 00,01 it should select 00 and update that value here)
    19950406     736189      00  -- As there is single col3 value in T20, 00 should be updated here.
                 736588      01  --  Here it should update col3 as '01' since for this pno(736588)
                 736588      01  --  Here too it should update col3 as 01 per requirement ,minimum value of this pno in T20
                 736588      01  --     same here too.. Sorry if my post formatting is not good...
    Hope i am clear in my requirement..(update T30 col3 based on min value of col3 of related records)
    Please suggest some update sql for this...(ideas would be great)
    I am using oracle 10 g version soon will be migrated to 11g..
    Regards
    Prasanth
    Edited by: Onenessboy on Oct 20, 2010 12:13 PM
    Edited by: Onenessboy on Oct 20, 2010 12:15 PM

    Onenessboy wrote:
    I am really sorry, my post so nonsense in look..
    I used to use for actuall code..
    the out put i tryped, i used [pre] , [/pre] but still does not look good..
    hmm..thanks for your suggestion hoek..
    so any ideas about my requirement...I would suggest spending a bit more time trying hoek's suggestion regarding {noformat}{noformat} tags instead of repeatedly asking for more help.
    Because to understand your requirement, people are going to have to read it first.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Creation of a new record based on the value of a picklist

    Hi,
    My requirement is whenever i select a picklist value in Opportunity record type based on the value selected a new opprtunity record should get created and get assigned to a role or A User otherwise a lead should get created and should be assigned to a Role or A User.
    Can I achieve this in OnDemand?
    Kindly help. This is urgent..
    Thanks in Advance.

    Can I achieve this in OnDemand?I think you can better try one of the Oracle CRM On Demand forums @ http://forums.oracle.com/forums/category.jspa?categoryID=162
    instead of the Oracle SQL and PL/SQL forum.
    This is urgent..The forums are relying on volunteers and it is weekend for most of us now.
    If it is really that urgent, call Oracle Support.

  • How to retrive new logical column based on flag values in table.

    Hi,
    i have two tables in rpd
    1.file table contains the coulmns------->date,file_count,record_count,cldm_stg,cmsa_stg,archive_stg
    2.rejection table columns---------> are same as above
    both have same common columns.my requirement is publish a dashboard like:
    date | land_files count |alnd_recordscount| target_files count|target_records count|Rejection filecount|rejection record count
    These report ineed retrive from those two tables.based on flag values.taget countcomes when all stg values set to ='y'
    i.e(cldm_stg='y' and cmsa_stg='y'and archive_stg='y') if not then it will be in rejection file.
    Please give solution how to achive my output.
    nQSError: 14026] Unable to navigate requested expression: Target_record:[DAggr(FILE_CONTROL.Target_record by [ FILE_CONTROL.FILE_NAME, REJECTED_FILES.FILE_NAME, REJECTED_FILES.NO_OF_ROWS, File_landing.NO_OF_ROWS, File_landing.FILE_LOAD_DATE] SB FILE_CONTROL)]. Please fix the metadata consistency warnings. (HY000)
    Edited by: user8767586 on Jan 12, 2010 4:29 AM

    Tanks for ypur reply .only two tables are there named as above.i taken file_control as a fact table.
    and i create one new tablecalled target in bmm layer taking logical source as file_control(fact table). and iset the where clause for the new table.and i create a new measure called target_file and target_records.in where clause my query is like
    dwbidb."".AUDIT_PROD.FILE_CONTROL.ARCHIVE_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.CMSA_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.LND_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.SCRIPT_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.STG_STATUS = 'Y'
    please tell me if this is right way to achive mt report. and tell me difference between fragmentation and whereclause.for my requrement i ahve to follow which method either fragmentation or whereclause.and in rpd there are no errors and warnings.but in answers i get a follwing error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: TARGET_FILECOUNT:[DAggr(TARGET.TARGET_FILECOUNT by [ TARGET.FILE_NAME] SB TARGET)]. Please fix the metadata consistency warnings. (HY000)
    SQL Issued: SELECT TARGET.FILE_LOAD_DATE saw_0, TARGET.TARGET_FILECOUNT saw_1, TARGET.TARGET_FILECOUNT saw_2 FROM AUDIT_PROD ORDER BY saw_0.
    Please tell me to achive my report.
    Regards
    Edited by: user8767586 on Jan 12, 2010 5:21 AM
    Edited by: user8767586 on Jan 12, 2010 5:21 AM
    Edited by: user8767586 on Jan 12, 2010 5:24 AM

Maybe you are looking for

  • JSP Design view not working in JDeveloper 10.1.3.3

    Hi, The problem I have is that my JSPs all throw a class not found error in design view when I load them. The problem is related to the useBean tag (see error example). Error exercising tag : jsp:useBean java.lang.Exception: java.lang.ClassNotFoundEx

  • USER_% tables needed by MapViewer

    Hi, We have a DB schema that must be copied from one DB (DEV) to another one (UAT) every night. This user owns the MapViewer definition tables. Once we drop the user (cascade) we lost all the tables USER_% tables managed by MapViewer and MapViewer ca

  • Code stopped working once in sequence

    We are controlling a LabSmith HV power supply in LabView using drivers from the manufacturer. We are trying to make injections by alternating between a floating and an applied voltage on channel D. In an earlier design we achieved this using a case s

  • Purging application logs automatically under Weblogic servers

    Hi, I am trying to explore purging options in Weblogic server. Could someone help me in finding a setting(if there is one) under Weblogic properties files, which will purge Application logs automatically after 'n' number of days. for example in D:\Hy

  • HT5035 how do i get a refund for mistakenly purchasing on itunes?

    how do i get a refubd for mistaenly purchasing on itunes?