Unable to use custom SQL query in report

Hi all,
I am newbie to OBIEE
I try to write a customized sql in one of the report in OBIEE answers.
No error is thrown when I click on "Set SQL" button.
But, when I try to click on "Result" tab, I get the below error message,
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: count(AS_SALES_LEADS.STATUS_CODE by [ ] ). Please fix the metadata consistency warnings. (HY000)
The same query I try running in Toad and it is not throwing any error, but running successfuly.
Kindly help me on this.
Regards,
Shivakumar A

Thank you very much for your time.
Below is the query I used,
SELECT saw_0."1", saw_0."2", saw_0."3"
FROM (SELECT COUNT (c.status_code) "1", COUNT (a.status) "2",
COUNT (c.accept_flag) "3"
FROM table1 c,
table2 g,
table3 f,
as_leads a
WHERE f.sales_group_id = g.sales_group_id
AND a.lead_id = c.sales_lead_id
AND a.customer_id = f.customer_id) saw_0
Result I get when run in Toad,
Col1 Col2 Col3
1234 43534 6787
But, the same when I put in advanced sql tab, I get the below error message,
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: count(AS_SALES_LEADS.STATUS_CODE by [ ] ). Please fix the metadata consistency warnings. (HY000)
Please do help me on this.
Hope the above information is enough for getting an idea what I am stuck up with.
Edited by: 961805 on 17 Oct, 2012 3:56 AM

Similar Messages

  • How can I use the Rownum/Customized SQL query in a Mapping?

    Hi,
    * I need to use a Rownum for populating one of the target field? How to create a mapping with Rownum?
    * How can I use an Dual table in OWB mapping?
    * Can I write Customized SQL query in OWB? How can I achieve this in a Mapping?
    Thanks in Advance
    Kishan

    Hi Niels,
    As I'm sure you know, the conundrum is that Reports doesn't know how many total pages there will be in the report until it is all done formatting, which is too late for your needs. So, one classical solution to this problem is to run the report twice, storing the total number of pages in the database using a format trigger, and throwing away the output from the first run when you don't know the total number of pages.
    Alternatively, you could define a report layout so that the number of pages in the output is completely predictable based upon, say, the number of rows in the main query. E.g., set a limit of one, two, ... rows per page, and then you'll know how many pages there will be simply because you can count the rows in a separate query.
    Hope this helps...
    regards,
    Stewart

  • Can we implement the custom sql query in CR for joining the two tables

    Hi All,
    Is there anyway to implement the custom sql query in CR for joining the two tables?
    My requirement here is I need to write sql logics for joining the two tables...
    Thanks,
    Gana

    In the Database Expert, expand the Create New Connection folder and browse the subfolders to locate your data source.
    Log on to your data source if necessary.
    Under your data source, double-click the Add Command node.
    In the Add Command to Report dialog box, enter an appropriate query/command for the data source you have opened.
    For example:
    SELECT
        Customer.`Customer ID`,
        Customer.`Customer Name`,
        Customer.`Last Year's Sales`,
        Customer.`Region`,
        Customer.`Country`,
        Orders.`Order Amount`,
        Orders.`Customer ID`,
        Orders.`Order Date`
    FROM
        Customer Customer INNER JOIN Orders Orders ON
            Customer.`Customer ID` = Orders.`Customer ID`
    WHERE
        (Customer.`Country` = 'USA' OR
        Customer.`Country` = 'Canada') AND
        Customer.`Last Year's Sales` < 10000.
    ORDER BY
        Customer.`Country` ASC,
        Customer.`Region` ASC
    Note: The use of double or single quotes (and other SQL syntax) is determined by the database driver used by your report. You must, however, manually add the quotes and other elements of the syntax as you create the command.
    Optionally, you can create a parameter for your command by clicking Create and entering information in the Command Parameter dialog box.
    For more information about creating parameters, see To create a parameter for a command object.
    Click OK.
    You are returned to the Report Designer. In the Field Explorer, under Database Fields, a Command table appears listing the database fields you specified.
    Note:
    To construct the virtual table from your Command, the command must be executed once. If the command has parameters, you will be prompted to enter values for each one.
    By default, your command is called Command. You can change its alias by selecting it and pressing F2.

  • Possible APEX BUG - Export to CSV from SQL Query (updateable report)

    I'm getting a the following sql error - just by enabling the Export to a CSV file from a SQL Query (updateable report) and selecting the export link - anyone have an idea what I could as a workaround?
    ORA-06550: line 1, column 45: PLS-00103: Encountered the symbol "1" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
    Error ERR-1000 Unable to determine LOV from "declare function x return varchar2 is begin 1 Not Checked;1 Not Checked,2 Review Passed;2 Review Passed,3 Reviewed w/ Issues;3 Reviewed w/ Issues,4 Not Applicable;4 Not Applicable return null; end; begin wwv_flow_utilities.g_query := x; end;".
    OK
    report error:
    ORA-20001: Error fetching column value: ORA-20001: Query must begin with SELECT or WITH

    Frank,
    I received your email with this same question so I'll just respond here. Our internet-facing hosted site apex.oracle.com allows you to request a workspace and, after the request is approved and the workspace provisioned, to develop applications there. If you already have an application that you need some help with, you can import/install it into your workspace on apex.oracle.com. This makes it easy to demonstrate problems to others who might be able to help.
    Sometimes it will be necessary for you to create developer accounts in your workspace in order for others to use your Application Builder. You can post usernames/passwords here or you can convey those privately to those offering their services. In either case, you'd want to remove or disable those accounts as soon as the problem is resolved. For problems that I ask to see demonstrated on apex.oracle.com, it is not necessary for you to create an account for me. I can do that as our group runs the site. I just need to know your workspace name and application ID.
    Scott

  • Is there a simple way to refresh a SQL Query (Updatable report) region

    I have a page in APex 4.1 that has many regions. I would like to be able to refresh a single region.
    Currently, I have the following
    Region (sql query updateable report).
    STATIC ID = LANDINGS
    in the region footer, I have:
    <script type="text/javascript">
    $s('P110_LANDINGS_REGION_ID','#REGION_STATIC_ID#');
    </script>
    P110_LANDINGS_REGION_ID is a hidden field.
    I use javascript to refresh....but it does not seem to be working. Previously, we had hard-coded the region id ( $a_report('1363338167540162011','1','100','100');) ...but that ID was somehow corrupted, which has lead me to the 'OMG...there must be an easier way!' lament.
    the javascript is:
    $a_report('P110_LANDINGS_REGION_ID','1','100','100');
    thanks!
    Karen
    ps. could I just directly reference the static id in my javascript...
    $a_report('LANDINGS','1','100','100');

    Karen,
    First off: please post code in &#123;code&#125;...&#123;code&#125; tags!
    function AddFavoriteSpecies()
    get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=favorite_species_collection',0);
    gReturn = get.get();
    rowCount = rowCount + parseInt(gReturn);
    pHMS_add = '&G_HMS_FLAG.';
    $a_report('1363338167540162011','1','100','100');
    //$a_report($x('P110_LANDINGS_ID').value,'1','15','15');the statement:
    $a_report('1363338167540162011','1','100','100'); works, but the statement $a_report($x('P110_LANDINGS_ID').value,'1','15','15'); does not.
    Can anyone help.
    I am assigning the page field P110_LANDINGS_ID in the footer of a region with a static id = LANDINGS.
    <script type="text/javascript">
    $s('P110_LANDINGS_ID','#REGION_STATIC_ID#');
    </script>
    Well, let's start by dumping $a_report. This is undocumented code, and it has long been replaced by triggering a refresh.
    Next, don't use $x(pNode).value to retrieve a value. Rather use $v(pNode) to do this.
    function AddFavoriteSpecies()
       get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=favorite_species_collection',0);
       gReturn = get.get();
       rowCount = rowCount + parseInt(gReturn);
       pHMS_add = '&G_HMS_FLAG.';
       //get the region id from the item
       //use it in a jQuery selector to get the region
       //trigger the refresh event on this object
       $("#" + $v('P110_LANDINGS_ID')).trigger('apexrefresh');
    }Now if you want to make sure that P110_LANDINGS_ID contains a value, add an alert with its value before you use it.
    alert('P110_LANDINGS_ID value: '+$v('P110_LANDINGS_ID'))

  • SQL Query (updateable report) Region - Conditionally Hide and Set Values

    SQL Query (updateable report) Region - Conditionally Hide and Set Values
    Outline of requirement :-
    Master / Detail page with Detail updated on same page using SQL Query (updateable report).
    The detail region has the following source
    SELECT item_id,
           contract_id,
           CASE WHEN hardware_id IS NOT NULL THEN
                   'HA'
                WHEN backup_dev_id IS NOT NULL THEN
                   'BD'
                WHEN hardware_os_id IS NOT NULL THEN
                   'HS'
           END item_type,
           hardware_id,
           backup_dev_id,
           hardware_os_id
    FROM   "#OWNER#".support_items
    WHERE  contract_id = :P26_CONTRACT_IDThe table support_items implements arced relationships and has the following columns
    CREATE TABLE SUPPORT_ITEMS
      ITEM_ID         NUMBER                        NOT NULL,
      CONTRACT_ID     NUMBER                        NOT NULL,
      HARDWARE_ID     NUMBER,
      BACKUP_DEV_ID   NUMBER,
      HARDWARE_OS_ID  NUMBER
    )A check type constaint on support_items ensures that only one of the fk's is present.
          (    hardware_id    IS NOT NULL
           AND backup_dev_id  IS NULL
           AND hardware_os_id IS NULL
    OR    (    hardware_id    IS NULL
           AND backup_dev_id  IS NOT NULL
           AND hardware_os_id IS NULL
    OR    (    hardware_id    IS NULL
           AND backup_dev_id  IS NULL
           AND hardware_os_id IS NOT NULL
          )    Hardware_Id is a FK to Hardware_Assets
    Backup_dev_id is a FK to Backup_Devices
    Hardware_os_id is a FK to Hardware_op_systems
    The Tabular Form Element based on item_type column of SQL query is Displayed As Select List (based on LOV) referencing a named list of values which have the following properties
    Display Value     Return Value
    Hardware Asset    HA
    Backup Device     BD
    Computer System   HSThe Tabular Form Elements for the report attributes for hardware_id, backup_dev_id and hardware_os_id are all Displayed As Select List (Based on LOV).
    What I want to do is only display the Select List for the FK depending on the value of the Select List on Item Type, e.g.
    Item_Type is 'HA' then display Select List for hardware_id, do not display and set to NULL the Select Lists for backup_dev_id and hardware_os_id.
    Item_Type is 'BB' then display Select List for backup_dev_id, do not display and set to NULL the Select Lists for hardware_id and hardware_os_id.
    Item_Type is 'HS' then display Select List for hardware_os_id, do not display and set to NULL the Select Lists backup_dev_id and hardware_id.
    There are properties on elements to conditionally display it but how do we reference the values of the SQL query Updateable region? they are not given a page item name?
    Also on the Tabular For Elements there is an Edit tick against a report item - however when you go to the Column Attributes there is not a property with which you can control the Edit setting.
    What's the best way of implementing this requirement in APEX 3.1?
    Thanks.

    >
    Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "user13515136".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    I have a multi-row region that displays values and allows entries in a number of fields.Provide exact details of how this has been implemented. (An example on apex.oracle.com is always a good way to do this.)
    I should like the fields to be conditional in that they do not permit entry, but still display, if certain conditions apply (e.g. older rows greyed out). Can this be done? Almost anything can be done, often in multiple ways. Which are appropriate may be dependent on a particular implementation, the skills available to implement it, and the effort you're willing to expend on it. Hence it's necessary to provide full details of what you've done so far...

  • Update Field On Change For A SQL Query (updateable report)

    Hi,
    I'd like to request help from anyone with ideas on how to solve this.
    We are using APEX 4.2, 10GR2, RedHat5.
    I have a report that comes from SQL Query (updateable report).
    I'm using the apex_item.text and apex_item.hidden on fields.
    I'm using a button to submit and after submit process to add some logic that I need.
    There could be 1 - 10 records in the report.
    There is only 1 field that is needed to enter a value, but the value of this field determines the value of another field.
    I think that I can do this with a submit button and an after submit process where I loop through all the records. I think I have this handled.
    This is the question
    When the value of that field is changed then the value of another field in the same row changes immediately.
    Is this possible?
    All the examples I've seen so far are for a single record and that doesn't work for us.
    I guess this is a MRU process but I haven't seen an example where a dynamic action is possible on a Multi Row Update.
    Could anyone direct me to where I can see an example or help me get directions?
    I appreciate all your help an comments and I thank you in advance.

    Yes why not...what you looking for is a ajax call
    See {message:id=10390979}
    Please note:-you can also do this as a dynamic action as shown below
    Event: Change
    Selection type: jQuery Selector
    jQuery Selector: input[name="f01"]
    True action with Execute JavaScript Code and put all code inside the test funtion, you may need to amend the code to use this.triggeringElemnt in place of this

  • Sql query in report/source

    Is possible use this kind of select select a,(select b from b) from b
    in sql query in report/source?

    Pretty much any valid select statement can be used.
    If it works in SQL*Plus, then it should work in Application Express.
    I think your example would not be valid if table b has more than one row.
    A scalar subquery (like your "select b from b") must only return a single value.
    SQL>  select ename, (select job from emp) from emp e;
    ORA-01427: single-row subquery returns more than one rowIf your subquery can be restricted to return one value, then it should work.
    SQL>  select ename, (select job from emp where empno = e.empno) job from emp e;
    ENAME      JOB
    KING       PRESIDENT
    BLAKE      MANAGER
    CLARK      MANAGER
    JONES      MANAGER
    SCOTT      ANALYST
    FORD       ANALYST
    SMITH      CLERK
    ALLEN      SALESMAN
    WARD       SALESMAN
    MARTIN     SALESMAN
    TURNER     SALESMAN
    ADAMS      CLERK
    JAMES      CLERK
    MILLER     CLERK
    14 rows selectedBut is that the kind of result you were looking for?

  • APEX 4.1, SQL Query(Updateable report), Validation issue.

    Hi,
    I am using APEX 4.1.
    I have SQL Query(Updateable report), we have created validation for the columns in this report.
    The validations are working properly only for the first row of the report on submitting, the remaining rows are not getting validated.
    If we check mark the rows it will get validated, but we want the validation to happen without checkmarking, on all the rows on clicking submit button.
    Can someone help me to fix this issue?
    Thanks in advance.
    Thanks & regards,
    Ravi.

    Hi Ravi,
    Welcome to Oracle Forums!
    Please acquaint yourself with the FAQ and forum etiquette if you haven't already done so.
    Always state
    <ul>
    <li>Apex Version</li>
    <li>DB Version and edition</li>
    <li>Web server used.I.e. EPG, OHS, ApexListner Standalone or with J2EE container</li>
    <li>When asking about forms always state tabular form if it is a tabular form</li>
    <li>When asking about reports always state Classic / IR</li>
    <li>Always post code snippets enclosed in a pair of &#123;code&#125; tags as explained in FAQ</li>
    </ul>
    I am using APEX 4.1.I have SQL Query(Updateable report), we have created validation for the columns in this report.
    The validations are working properly only for the first row of the report on submitting, the remaining rows are not getting validated.
    If we check mark the rows it will get validated, but we want the validation to happen without checkmarking, on all the rows on clicking submit button.
    Can someone help me to fix this issue?
    >
    Post your validation code with some explanations of what the g_fnn are.
    Cheers,

  • Problem With SQL Query (updateable report)

    Hi,
    I have a report which I have set as type 'SQL Query (updateable report)'. I have added a 'row selector' to the report but when I run it I get the following error message:
    failed to parse SQL query:
    ORA-00904: "COL60": invalid identifier
    The report works fine if I remove the row selector. Any ideas as to why the error is being produced?
    Cheers
    Simon

    I don't have the apex_application.g_f01(i) referenced in the page source...In the page source you wouldn't find anything by that name
    Identify the tabular form's checkbox column in the page(firebug/chrome developer panel makes this easy)
    It should be like
    &lt;input id=&quot;...&quot; value=&quot;&quot; type=&quot;checkbox&quot; name=&quot;fXX&quot; &gt;we are interested in the name attribute , get that number (between 01 and 50)
    Replace that number in the code, for instance if it was f05 , the code would use
    apex_application.g_f05
    --i'th checked record' primary keyWhen you loop through a checkbox array, it only contains the rows which are checked and it is common practice to returns the record's primary key as the value of the checkbox(available as the the i'th array index as apex_application.g_f05(i) , where i is sequence position of the checked row) so that you can identify the record.

  • Type: SQL Query (updateable report)

    Hello,
    Is it possible to default a field value in a SQL Query (updateable report) Report Region in a DML Form when the 'Add Row' button is clicked? I want to default some List of Value fields. This is not as simple as a HTML Region Item based on a table, there is a 'Default' tab where the field value goes. Any help is appreciated, thanks.

    Hi,
    On the tabular form's Column Attributes tab, select the column. You should see a section headed "Tabular Form Element". In there, there are two settings you can use: Default Type and Default
    Andy

  • Sql Query(Updateable Report) with pagination

    Hi,
    We're on APEX 3.2 I have a question on Sql Query(Updateable Report) and pagination. I have an updateable report which we have set to show 20 rows. When the userwhi has more than 20 rows enters the data and clicks next the data disappears. I have been reviewing other posts, but haven't come to a clear conclusion on how to prevent this from happening. I have been trying to use javascript to show a save popup when clicking 'Next' Any help is appreciated.
    Thanks,
    Joe

    any ideas?

  • SQL Query updateable report with row selector. Update process.

    I have a SQL Query updateable report with the row selector(s).
    How would I identify the row selector in an update process on the page.
    I would like to update certain columns to a value of a select box on the page.
    Using the basic:
    UPDATE table_name
    SET column1=value
    WHERE some_column=some_value
    I would need to do:
    UPDATE table_name
    SET column1= :P1_select
    WHERE [row selector] = ?
    Now sure how to identify the [row selector] and/or validate it is checked.
    Thanks,
    Bob

    I don't have the apex_application.g_f01(i) referenced in the page source...In the page source you wouldn't find anything by that name
    Identify the tabular form's checkbox column in the page(firebug/chrome developer panel makes this easy)
    It should be like
    &lt;input id=&quot;...&quot; value=&quot;&quot; type=&quot;checkbox&quot; name=&quot;fXX&quot; &gt;we are interested in the name attribute , get that number (between 01 and 50)
    Replace that number in the code, for instance if it was f05 , the code would use
    apex_application.g_f05
    --i'th checked record' primary keyWhen you loop through a checkbox array, it only contains the rows which are checked and it is common practice to returns the record's primary key as the value of the checkbox(available as the the i'th array index as apex_application.g_f05(i) , where i is sequence position of the checked row) so that you can identify the record.

  • Change "SQL Query" report to "SQL Query (updateable report)" report?

    I manually made a report, because the tabular report made by the wizard gave me no possibility to use a popup LOV. Now I have this report, but I cant apply an MRU process on it, becuase it's not an "SQL Query (updateable report)". How can I change my report to a "SQL Query (updateable report)"? I only can choose between SQL Query and SQL QUERY (PL/SQL function body returning SQL query).

    Hi Tom
    You can just write the processes yourself. Although trickier this can give you a lot more control over row processing.
    APEX_APPLICATION.G_F01, F02 etc are global variables in the apex_application package that are defined as arrays.
    These are regularly used in tabular forms to reference values within them. The normal ordering would be column 1 = G_F01, column 2 = G_F02 etc etc. Although you can change these and even assign more than one column to an array.
    The example
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
    INSERT INTO my_table VALUES(:P1_EMPID , APEX_APPLICATION.G_F01(i));
    END LOOP;Is saying - for the number of values in the array G_F01 (probably column 1) loop insert into the table the value of the associated value in the array. So first time through i=1 - so the first value in the array (probably row 1 in column 1), next time i=2 so the second value in the array is used (probably row 2 in column 1) and so on...
    When you've created a manual tabular form (what I would call what you've done) you have created the items using the APEX_ITEM package in your query. The first parameter for this is p_idx which defines which global array to hold it in.
    Cheers
    Ben

  • SQL Query (updateable report) CheckBox Update Problem

    My process will update 1 or 2 rows, but fails on three or more rows. All the rows on the page can be processed, up to 2 at a time.
    The SQL Query Report can have 50 rows on a page. Only the check box and the hidden primary key column are returned by the report to the process (marked as edit).
    If I issue the update myself, I can update any number of rows with no error.
    If I change the update SQL to a select, it works for the all of the checked lines (the correct count is displayed in the process message.
    The only thing I see for the failure is a url
    http://d101dbaxeaa2llb:10700/apex/wwv_flow.accept
    Process is:
    DECLARE
    vRow BINARY_INTEGER;
    item NUMBER;
    BEGIN
    item := 0;
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    item := item + 1;
    vRow := apex_application.g_f01(i);
    update #OWNER#.B_ATT_DAYS_FUT
    set day_status_cd =
    case
    when day_status_cd = -1 and day_dt is not null then 2
    when day_status_cd = -1 and day_dt is null then 0
    when day_status_cd = 6 then 7
    else 2
    end
    where days_pk = to_number(apex_application.g_f02 (vRow));
    END LOOP;
    :P35_CHECKED_CT := item;
    END;
    This is in APEX Application Express 3.1.0.00.32 on Oracle 11.1.0.6.0.

    Query is at the end. The Report Regions is a SQL Query (Updatable Report).
    I don't thinks this is my code problem.
    The system I'm using is dieing. It has had two disk crashes, which spinrite brought back. I've restored from a partition image and a full cold backup. Then I've had a number of blue screen failures. One of the DBAs working for me rebuilt the 11g instance on a VM and restored the cold backup. Everything runs fine there. I even applied the latest code export from the failing systems development workspace to the VM based system. Still runs fine.
    There are a number of abends in the alert log ORA-07445 and ORA-21779 for which our on-site ASC Engineer has opened a TAR/SR. I suspect that some part of one of the FLOW tablespaces was damaged, a part which deals with runtime APEX. Build time is running fine. Application just does not, either as a runtime or in the development system.
    We are moving to a new AIX server, just finishing the setup and then I can send over the exports. That should put this to bed.
    SELECT
    DAYS_PK
    , NAME_TX
    , DAY_CD
    , DAY_DESC_TX
    , DAY_STATUS_CD
    , DAY_STATUS_DESC_TX
    , DAY_DT
    , REASON_TX
    , TEN_DAY_PERIOD_FL
    , EARNED_ON_DT
    , EXPIRES_ON_DT
    , PLANNED_ON_DT
    , GUARANTEED_DAY_CD
    , GUARANTOR
    FROM
    (SELECT
    DAYS."DAYS_PK"
    , A_ATT_USERS.NAME_TX
    , DAYS."DAY_CD"
    , DAY_CD."DAY_DESC_TX"
    , DAYS."DAY_STATUS_CD"
    , DAY_ST_CD."DAY_STATUS_DESC_TX"
    , DAYS."DAY_DT"
    , DAYS."REASON_TX"
    , DAYS."TEN_DAY_PERIOD_FL"
    , DAYS."EARNED_ON_DT"
    , DAYS."EXPIRES_ON_DT"
    , DAYS."PLANNED_ON_DT"
    , CASE DAYS."GUARANTEED_DAY_CD"
    WHEN 'E' THEN 'GUARANTEED'
    WHEN 'R' THEN 'GUARANTOR'
    ELSE NULL
    END GUARANTEED_DAY_CD
    , G_ATT_USERS.NAME_TX "GUARANTOR"
    FROM
    "B_ATT_DAYS_FUT" DAYS
    LEFT OUTER JOIN "A_ATT_USERS" G_ATT_USERS
    ON
    "DAYS"."GUARANTEED_COMIT_ID" = "G_ATT_USERS"."COMIT_ID"
    LEFT OUTER JOIN "A_ATT_USERS"
    ON
    "DAYS"."COMIT_ID" = "A_ATT_USERS"."COMIT_ID"
    , "T_ATT_DAY_CD" DAY_CD
    , "T_ATT_DAY_STATUS_CD" DAY_ST_CD
    WHERE
    DAYS."DAY_CD" = DAY_CD."DAY_CD"
    AND DAYS."DAY_STATUS_CD" = DAY_ST_CD."DAY_STATUS_CD"
    AND DAYS.COMIT_ID IN
    SELECT DISTINCT
    ( R.COMIT_ID )
    FROM
    ATT_ATTENDANCE.A_ATT_STAFF_ROLE R
    WHERE
    R.COMIT_ID <> :P1_COMIT_ID_HIERARCHY START
    WITH R.COMIT_ID = :P1_COMIT_ID_HIERARCHY
    CONNECT BY PRIOR R.COMIT_ID = R.MGR_COMIT_ID
    AND DAYS.DAY_STATUS_CD IN ( 1, -1, 6 )
    AND DAYS.COMIT_ID <> :P1_COMIT_ID
    ORDER BY
    A_ATT_USERS.NAME_TX
    , DAYS.DAY_DT
    , DAYS.DAY_CD DESC
    , DAYS.EARNED_ON_DT)
    WHERE
    INSTR(UPPER(NAME_TX),UPPER(COALESCE(:P35_S_NAME,NAME_TX))) > 0

Maybe you are looking for

  • SDDM 3.3 EA2  advice for export of one or more logical subview(s)

    Hello! We have the need to export certain subviews to development. I just wanted to export one logical subview to Data Modeler Design. To sum it up it was not easy to understand. IMHO in SDDM 3.3.EA1 it was much more intuitive and easy. New: A new co

  • Polish charater appearing as ? in PDF output

    Hi All, I am generating a PDF report through XML publisher. Only labels in the report are in polish language means these are not coming from database. The data is in English only. When I run report in APPS then some character appears as '?' in output

  • Error Handling in info-package strangely doesn't work

    Dear All, I'm trying to load master-data from R3 containing time-dependent attributes which, I know, are sometimes overlapping. As I still want to load the correct part of data, i've set Processing - via PSA and Error Handling - "Updating valid recor

  • IPhoto 6 or Photo to Movie

    Hey all, I'm a new Mac user and do like iPhoto 6 quite a bit for making slideshows with all the slick transitions and the Ken Burns effect. I ran across Photo to Movie and am wondering if anyone has had recent experience with this program? What's tha

  • SRM Get PO details

    Good Day! May i know if there were standard report or function module to get the PO details. I need the following fields to create a Customized Report. - Reference Shopping Cart - Approver of the PO - PO Status by the way we are using SRM 7.0 (Extend