Not able to add Where clause I last query

Dear Metallica

I created the report and last, I added where clause to find record use Serach point in the area of research, but it does not work

My Code
SELECT apex_item.checkbox (1, timesheet_id, 'UNCHECKED') tick, timesheet_id,
       pm.description project_description, pm.project_id, pm.NAME,
       tam.task_name, xxpria_vendor_name (resource_name) resource_name,
       submission_date "Timesheet Date", quantity hours,
       (planed_hour - tm.quantity) balance, tm.attribute2 remarks
  FROM timesheet_master tm, pa_task_mas tam, pa_projects_all pm
 WHERE tam.task_id = tm.task_number and 
       pm.project_id=tm.PROJECT_NUMBER      
AND tm.submitted_flag = 'Y'
   AND xx_resource_id (resource_name) =
          (SELECT DISTINCT person_id
                      FROM pa_project_players
                     WHERE project_role_type LIKE 'TEAM MEMBER'
                       AND person_id = xx_resource_id (tm.resource_name)
                       AND project_id = pm.project_id
                       AND tm.submission_date BETWEEN start_date_active
                                                  AND NVL (end_date_active,
                                                           '01-APR-2040'
                                                          ))
   AND tm.approved_flag = 'N'
   AND status = 'INPROCESS'
   AND pm.project_id IN (
          SELECT project_id
            FROM pa_project_players
           WHERE project_role_type = 'PROJECT LEADER'
             AND person_id = xx_resource_id (:app_user)
             AND tm.submission_date BETWEEN start_date_active
                                        AND NVL (end_date_active,
                                                 '01-APR-2040'
                                                ))
UNION
SELECT apex_item.checkbox (1, timesheet_id, 'UNCHECKED') tick, timesheet_id,
       pm.description project_description, pm.project_id, pm.NAME,
       tam.task_name,
       xxpria_vendor_name (resource_name) resource_name,
       submission_date "Timesheet Date", quantity hours,
       (planed_hour - tm.quantity) balance, tm.attribute2 remarks
  FROM timesheet_master tm, pa_task_mas tam, pa_projects_all pm
 WHERE tam.task_id = tm.task_number and 
       pm.project_id=tm.PROJECT_NUMBER
      AND tm.submitted_flag = 'Y'
   AND xx_resource_id (resource_name) =
          (SELECT DISTINCT person_id
                      FROM pa_project_players
                     WHERE project_role_type LIKE 'PROJECT LEADER'
                       AND person_id = xx_resource_id (tm.resource_name)
                       AND project_id = pm.project_id
                       AND tm.submission_date BETWEEN start_date_active
                                                  AND NVL (end_date_active,
                                                           '01-APR-2040'
                                                          ))
   AND tm.approved_flag = 'N'
   AND status = 'INPROCESS'
   AND pm.project_id IN (
          SELECT project_id
            FROM pa_project_players
           WHERE project_role_type = 'PROJECT MANAGER'
             AND person_id = xx_resource_id (:app_user)
             AND tm.submission_date BETWEEN start_date_active
                                        AND NVL (end_date_active,
                                                 '01-APR-2040'
                                                ))
UNION
SELECT apex_item.checkbox (1, timesheet_id, 'UNCHECKED') tick, timesheet_id,
       pm.description project_description, pm.project_id, pm.NAME,
       tam.task_name,
       xxpria_vendor_name (resource_name) resource_name,
       submission_date "Timesheet Date", quantity hours,
       (planed_hour - tm.quantity) balance, tm.attribute2 remarks
  FROM timesheet_master tm, pa_task_mas tam, pa_projects_all pm
 WHERE tam.task_id = tm.task_number and 
       pm.project_id=tm.PROJECT_NUMBER
      AND tm.submitted_flag = 'Y'
   AND xx_resource_id (resource_name) =
          (SELECT DISTINCT person_id
                      FROM pa_project_players
                     WHERE project_role_type LIKE 'PROJECT MANAGER'
                       AND person_id = xx_resource_id (tm.resource_name)
                       AND project_id = pm.project_id
                       AND tm.submission_date BETWEEN start_date_active
                                                  AND NVL (end_date_active,
                                                           '01-APR-2040'
                                                          ))
   AND tm.approved_flag = 'N'
   AND status = 'INPROCESS'
   AND pm.project_id IN (
          SELECT project_id
            FROM pa_project_players
           WHERE project_role_type = 'PRACTICE HEAD'
             AND person_id = xx_resource_id (:app_user)
             AND tm.submission_date BETWEEN start_date_active
                                        AND NVL (end_date_active,
                                                 '01-APR-2040'
                                                ))

where (nvl(:P75_RESOURCE_NAME,'0') = '0' or tm.resource_name=:P75_RESOURCE_NAME)
Below where conditon does not
where (nvl(:P75_RESOURCE_NAME,'0') = '0' or tm.resource_name=:P75_RESOURCE_NAME)
How to solve it.

Thank you

Try:

select * from
(
   <>
)
where nvl(:P75_RESOURCE_NAME,'0') = '0' or resource_name=:P75_RESOURCE_NAME

Tags: Database

Similar Questions

  • I'm not able to add a shared printer on a Windows XP client computer.

    original title: network printers

    I'm not able to add a shared printer on a Windows XP client. One, printers

    Canon MP830 and an Okidata 320 are installed locally on a Windows 2003 Print

    Server. Both are on the same domain. I also have Windows XP, 7, Vista and Linux

    machines on the same network. They are all able to print. The only one who does

    not working is a Windows XP client. This machine has also win 7, Vista installed

    on different hard drives. they are able to print to shared printers. I have

    cammot access to a printer by using the UNC path. I can see the shared

    printers in Favorites network but I can not connect. If I use the add printer

    Wizard to add a network printer, the printer appear in the book: but

    Yet once, they will not connect the error message I get is:

    "Unable to add the printer connection. Either the typed wsa printer name

    incorrctly, or the specified printer has lost its connection to the server. »

    I checked the permissions for the priners and I am logged in as one

    administrator when I try to add the printer. I also checked the group policy and

    everything seems to be oK. I also deleted and added the printer to the

    Server, that I managed to install them as local printers on the affected XP machine

    using the \\server_name\printer_share_name port. The priner name and the

    share name are the same for each printer. They have all worked last week that

    network printers. I'm curious to know what is causing this weird behavior. Any

    help would be greatly appreciated.

    Thank you

    John

    Hello

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Technet Forum. You can follow the link to your question:

    http://social.technet.Microsoft.com/forums/en-us/category/w7itpro

    Hope that helps.

  • Portal provider - account - not able to add PayPal info.

    Hello

    Vender ID - 59788.

    I'm not able to add paypal info. It crashes me to add my first app before 11.

    If I click on any tab 'Manage account details. "
    I get routed to the tab "Info from the seller" with an error - "address 1 must be well defined without any special character.
    Special characters I only there is "/" and ",".

    Remove the two and save deletes the error but does not really save address

    (Perhaps because the India has no defined States and validation seems to be stuck).

    Even with this temporary change of address (which survives no disconnection/connection but removes the address 1 error).

    by clicking on any Reroute tab tab information from the seller.

    Well well please please do not use google chrome everything first.

    use firefox or internet explore. clear the cache and it will work perfectly.

    one last thing, if you tried 5 times, then you must update the next day, it won't work not today.

    Press on as if it helped u

  • Add where clause dynamically

    Hi Experts,

    I have a VO with query like select * ministries dept, emp where dept.dept_id = emp.dept_id group... by order of dept.dept_id employees

    At runtime, I need to add where clause with (and in dept.dept_id (select dept_id from table2))

    I tried to use the vo.setWhereClause () method. But it does not work

    Is there another solution?

    I use Jdeveloper 12.1.3

    Thanks in advance.

    There are various possible solutions for this. You can either use setQuery that defines the entire sql statement. However, you then need to delete where condition adding yourself too.

    Or you use viewCriteria as explained in this blog http://www.ahsanscorner.com/content/2015-11-16-1942-simulating-sql-clause-adf-viewcriteria-api.

    Another approach is described by this blog Jet binary: using bind variable for SQL statements with the paragraph who uses a SQL table to build the in clause.

    Timo

  • HELP: Not able to add attachments - system crashes; only through "END TASK MANAGER" can I leave Mozilla

    I'm not able to add attachments - system freezes. only through "END TASK MANAGER" can I leave Mozilla edit

    jasher2000, later in the same day in Microsoft Outlook folders relate not... then, when everything has failed, I rebooted the system and so far today, no problem! PTL, thanks for your help!

  • Not able to add printers on El Capitan

    I have a late 2009 Mac Mini running OS X El Capitan 10.11.4.  Since the update to El Capitan, I'm not able to add printers, or find software of the printer.  When I opened the printers and Scanners in system preferences, then click (+) to set up a printer, 'Name', 'Place' and 'Use' is not selectable.  If they are not selectable, how am I supposed to add a printer?

    I have a printer Laser of Brother DCP-7065DN.  When I connect it via USB, it does not appear.  All ports operate. (I checked quad).  The cord works with my other printer (a Canon MX860), is not the power cord.

    Any help in this matter would be greatly appreciated!

    Visit brother support website and search for the latest driver. Download and install, and then try again.

  • BlackBerry Smartphones not able to add new contacts or edit existing contacts on my BB Curve 8900

    I'm not able to add new contacts on my BB 8900 curver. This problem started two weeks ago. I tried to remove the battery and all, but still questions is not resolved. Also, I think the phone got a little slow. Can someone help me. My BB PIN is 21921334. If someone me message please... I am now struggling with my bb... I don't want to lose... because I'm so attached to my bb. What should I do to fix this? I think that there are only about 300contacts saved on the phone. I would like to receive assistance...

    We hope to get something of value within our community of bb...

    I'm just try minute couple coz there I am facing same problem and his work. I don't know if can reinstall everything back. Just try and look at the result.

  • BlackBerry Smartphones not able to add or edit contact

    Hello

    I'm not able to add or edit the contact in my phone (BB Curve), 8520. I can only delete contacts. Someone please help with this problem. Thank you

    Kind regards. Harris

    If you have Messenger from Yahoo!, Hotmail Messenger or AIM Messenger, uninstall all of them, the problem will be resolved...

  • I've just updated Adobe Professional, but I'm not able to add, to delete the pages more. Before the update, it wasn't a problem. I missed something?

    I've just updated Adobe Professional, but I'm not able to add, to delete the pages more. Before the update, it wasn't a problem. I missed something?

    Are you sure that you're not open your files with the free player instead of using Acrobat? And please do not post the same question multiple times. Also, try to be more specific. "I am not able" can mean many different things.

  • I just ran updated today in DC and now I am not able to add text notes and my signature to a PDF document I have in the previous version... suggestions please.

    I just ran updated today in DC and now I am not able to add text notes and my signature to a PDF document I have in the previous version... suggestions please.

    The option to edit PDFS in tools has an associated cost, and this tool was already in my previous release... a way to revert to this version?

    Use Adobe Acrobat, Acrobat Reader.

  • Not able to add the snapshot file to the virtual machine

    We have Win 2003 virtual machine running on ESXi 4.0.0 261974. The virtual machine has two vmdk files. We had taken the snapshot a few days back and today by mistake, we have removed one of the vmdk (DB - srv - 000001.vmdk - snapshot file). Now, we are not able to add the snapshot file to the virtual machine. When tried to add the existing vmdk, it displays only the source disk (DB - srv.vmdk). Please, help us to solve this problem.

    The GUI allows only adding the base vmdk. To add the Flash disk, you must manually change the vmx file. Registrations for the formerly removed virtual disk could still exist in the vmx file with... .present = "FALSE". After changing the vmx file you must reload the configuration. To do this, remove the VM of the inventory and add it back again (right-click on the vmx file).

    André

  • Not able to add the selection of Types of paper taken in charge

    Hello
    I am new to Oracle B2B.
    Through the steps in the tutorial http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10229/b2b_tps.htm#BABGAJDE
    Completed up to 5.3 - task 2 (add a user in the Interface of B2B Oracle)
    And the next thing,
    I'm not able to add select support Document Types.When I click on the "Add supported document type for the selected user", I see "CUSTOM", "EDI_EDIFACT" etc., but in this form has been disabled my ' Add ' button.
    Please let me know how to proceed with this.

    Thank you
    Dembele.

    Edited by: 796969 09/27/2010 14:11

    Hi dembele,.

    To add a document, you must first create that.

    Follow link below to see that the way to create a document.

    http://download.Oracle.com/docs/CD/E14571_01/integration.1111/e10229/bb_doc_flow.htm#BABFGDBA

    Once you have created a document, then go to add it. After the name of Protocol of document in which you created the document, you will see a sign plus. Expand until you see the definition of documents, that you created. Now, select the document definition name, and add the button is activated. Click Add to add this document definition in the trading partner profile.

    Kind regards
    Anuj

  • Setting in the WHERE clause of the query

    Hi all

    I have 2 tables.

    TABLE_A contains 10 million documents.
    TABLE_B contains 100 records.

    I associate myself with these 2 tables

    Here's a.ID left
    SELECT A.*, B.*
    FROM TABLE_A a, TABLE_B b
    WHERE a.ID = b.ID;
    Here's b.ID left
    SELECT A.*, B.*
    FROM TABLE_A a, TABLE_B b
    WHERE b.ID = a.ID;
    My question is what query will give better performance? I thought that, if we put the column in the table with a lower number of lines on the left, then it will be faster than the other.

    In current versions of Oracle, it does not matter in what order you sum-up your predicates in the WHERE clause of a query: they will be optimized/executed in a way even.

  • Setting of outsourcing work is not for a SQL Where clause

    Im trying to outsource the WHERE SQL clause of a snapshot data (connecting to Siebel DB) and specify where clause in the run profile that does not work.

    Snapshot of research: Select the name of siebel.s_org_ext

    Parameter of outsourcing: where_clause_sql

    Run the content of the profile:

    phase. Phase1.snapshot.clt.where_clause_sql = name = "ABC0009".

    #phase. Phase1.snapshot.clt.snapshot_sql = select name from siebel.s_org_ext where name = 'ABC0009 '.

    The above parameter retrieves all the records in the table. Below the profile execution retrieves just this record that seems to work fine.


    Run the content of the profile:

    phase. Phase1.snapshot.clt.snapshot_sql = select name from siebel.s_org_ext where name = 'ABC0009 '.


    I want to outsource only where clause as there are many SQL and they are huge to maintain in the run profile.

    I have attached a doco with screenshots that will help to understand more.

    Hello

    You must BE

    -Choose "Select table or view" in the table of the snapshot Wizard selection page

    &

    -Use outsourced where clause

    OR

    -Choose "SQL" in the snapshot table selection wizard page.

    &

    -Outsourced use SQL snapshot

    You can't mix and match options.

    Kind regards

    Nick

  • NVL selection list does not not on the place where clause in query

    Ok. APEX 4.2...

    Im having problems with my selection lists and NULL values... I see that it has come time and time again...

    I have a tabular presentation, with a query based on a selection list.  The selection list has the ability to '- Show All -'... The value of the selection list is a number, and the display is words...  (for reference the LOV query is: select status, batch from pmt_stat_lookup by 1)

    Initially I had problems with null and invalid numbers like ' display Null = 'Yes' and the problem of null % ', so have used the code in this blog to remove the NULL values... Display Null = & amp; #34; Yes & amp; #34; and the problem of null % | Inside Oracle APEX by Patrick Wolf

    Then in the application of my report, I have a where clause clause that checks the value of the selection list... WHERE batch = nvl(:P11_STATUS_SELECT,STATUS_ID)

    everything works almost fine, and I can choose a status, or I choose - see the All-, but the query will not include the lines where the State is null.

    (I also see that maybe I should be, use the case statement instead of the NVL on where clause, but not sure of the syntax. In addition, NVL was used somewhat in the different reports in the application...)

    For reference, the code of the old blog that I as a process page is:

    BEGIN

    FOR rItem IN

    (SELECT NOM_ELEMENT

    OF APEX_APPLICATION_PAGE_ITEMS

    WHERE APPLICATION_ID = TO_NUMBER(:APP_ID)

    AND PAGE_ID IN (TO_NUMBER(:APP_PAGE_ID), 0)

    AND LOV_DISPLAY_NULL = 'Yes'

    AND LOV_DEFINITION IS NOT NULL

    -change here

    AND LOV_NULL_VALUE = '% null | '%'

    )

    LOOP

    IF V (rItem.ITEM_NAME) = "% null | '%'

    THEN

    Apex_Util.set_session_state (rItem.ITEM_NAME, NULL);

    END IF;

    END LOOP;

    END;

    Thank you very much

    Richard

    Richard,

    Perhaps this example can help you solve your problem.

    https://Apex.Oracle.com/pls/Apex/f?p=63838:2

    Jeff

Maybe you are looking for

  • Rent a movie on itunes

    I would like to rent a movie from iTunes on my ipad2air and watch when I'm on a plane. Make her pay on iTunes at home and download on my iPad? So can I watch it on the plane? How much time, you have to keep a movie? And when my time expired ihas it a

  • Trying to set the BIOS to boot from CD with Acronis HD clone software

    Want to 700-056.  16 GB of Ram.  Qurdro graphic K600. I just installed a 240 gb SSD, Kingston. To move the operating system (8.1), I need to boot from a DVD with Acronis program. Under the legacy in BIOS, Acronis is displayed.  I move under the legac

  • Satellite A300-1MC - Bluescreen Error

    Help, please...! I got the Toshiba laptop since January, no major problems. Yesterday, when I booted my laptop suddenly it restarted on a blue screen for about 30 seconds, then restarted on another screen asking if I wanted to start in SafeMode...? !

  • Cannot install windows 7 Enterprise 32-bit edition, or 64-bit on a thinkcentere p310

    I was able to install 10 32-bit and 64-bit, windows 8.1 32-bit and 64-bit windows. When I try to install windows 7 32 bit or 64 bit, I have no keyboard no mouse when I get to the windows installation screen. I use the USB 2.0 ports on the back and ha

  • How to finish my defrag and how to lock the computer

    I have a windows xp with vista netbook.  How to make chkdsk /f to run.  How to defragment to finish.  What are the mpf files.  It says I have fragemendted How safe boot that.  Also, I don't have my net number of the computer.  How to download c ++ fo