How to create a folder or a report of a parameter query and a Union

I have created folders with the unions, but I'm having difficulty coverting a parameter query and a Trade Union.

The following works fine in SQL * Developer without parameters, but I want to change to use parameters for the year and the quarter and use it in Discoverer:
SELECT TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000') FEID,
  AV.FIRM_NAME VENDOR_NAME,
  AV.BIDCLASS CONTRACT_CODES,
  AV.AWAMT AWARD_AMOUNT,
  AV.SOL_MODE FORMAL_INFORMAL,
  AV.CERT BUSINESS_ENTITY,
  AV.ETHNICITY ETHNICTY,
  AV.PO_NUMBER_FORMAT CONTRACT,
  SUM(VP.INVOICE_AMOUNT) AMOUNT_PAID_$
FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV,
  CONFIRM.VSTATE_VENDOR_PAYMENTS VP
WHERE ( ( AV.PO_NUMBER = VP.PO_NUMBER
AND AV.VENDOR_ID       = VP.VENDOR_ID ) )
AND (TO_CHAR(VP.PAYMENT_DATE,'Q') = '4')
AND ( TO_CHAR(VP.PAYMENT_DATE,'YYYY') = '2009' )
GROUP BY TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000'),
  AV.FIRM_NAME,
  AV.BIDCLASS,
  AV.AWAMT,
  AV.SOL_MODE,
  AV.CERT,
  AV.ETHNICITY,
  AV.PO_NUMBER_FORMAT 
  union 
SELECT TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000') FEID,
  AV2.FIRM_NAME VENDOR_NAME,
  AV2.BIDCLASS CONTRACT_CODES,
  AV2.AWAMT AWARD_AMOUNT,
  AV2.SOL_MODE FORMAL_INFORMAL,
  AV2.CERT BUSINESS_ENTITY,
  AV2.ETHNICITY ETHNICTY,
  AV2.PO_NUMBER_FORMAT CONTRACT,
  0 AMOUNT_PAID_$
FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV2
WHERE 
not exists (SELECT 'X'
              FROM CONFIRM.VSTATE_VENDOR_PAYMENTS VP2
             WHERE av2.po_number = vp2.po_number
                   AND (TO_CHAR(VP2.PAYMENT_DATE,'Q') = '4') 
                   AND ( TO_CHAR(VP2.PAYMENT_DATE,'YYYY') = '2009' )) 
AND (TO_CHAR(AV2.AWDATE,'Q') = '4') 
AND (to_CHAR(AV2.AWDATE,'YYYY') = '2009')
GROUP BY TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000'),
  AV2.FIRM_NAME,
  AV2.BIDCLASS,
  AV2.AWAMT,
  AV2.SOL_MODE,
  AV2.CERT,
  AV2.ETHNICITY,
  AV2.PO_NUMBER_FORMAT 
Can anyone provide a solution?

Thank you
Robert

Hello
You can take the parameters to select so that you will be able to create the conditions above them.
Try to use this SQL instead of your and the discoverer workbook create the conditions and parameters:

SELECT TO_CHAR (NVL (AV. TAX_ID, 999999999), '000000000') FEID,.
AV. $VENDOR_NAME FIRM_NAME,
AV. BIDCLASS CONTRACT_CODES,
AV. AWAMT AWARD_AMOUNT,
AV. SOL_MODE FORMAL_INFORMAL,
AV. CERT BUSINESS_ENTITY,
AV. ETHNICITY ETHNICTY,
AV. PO_NUMBER_FORMAT CONTRACT,
TO_CHAR (VP. PAYMENT_DATE, 'YYYY') P_YEAR,.
TO_CHAR (VP. PAYMENT_DATE, 'Q') P_QTR
SUM (VP. INVOICE_AMOUNT) AMOUNT_PAID_$
TO CONFIRM. VSTATE_PAID_AWARD_VENDORS AV,
CONFIRM. VP VSTATE_VENDOR_PAYMENTS
WHERE ((AV. PO_NUMBER = VP. PO_NUMBER
AND AV. VENDOR_ID = VP. VENDOR_ID))
- AND (TO_CHAR (VP. (PAYMENT_DATE, 'Q') = '4') *.
- AND (TO_CHAR (VP. (PAYMENT_DATE, 'YYYY') = '2009') *.
TO_CHAR GROUP (NVL (AV. TAX_ID, 999999999), '000000000').
AV. FIRM_NAME,
AV. BIDCLASS,
AV. AWAMT,
AV. SOL_MODE,
AV. CERT,
AV. ETHNIC ORIGIN,
AV. PO_NUMBER_FORMAT,
TO_CHAR (VP. PAYMENT_DATE, 'YYYY') P_YEAR,.
TO_CHAR (VP. PAYMENT_DATE, 'Q') P_QTR
Union
SELECT TO_CHAR (NVL (AV2. TAX_ID, 999999999), '000000000') FEID,.
AV2. $VENDOR_NAME FIRM_NAME,
AV2. BIDCLASS CONTRACT_CODES,
AV2. AWAMT AWARD_AMOUNT,
AV2. SOL_MODE FORMAL_INFORMAL,
AV2. CERT BUSINESS_ENTITY,
AV2. ETHNICITY ETHNICTY,
AV2. PO_NUMBER_FORMAT CONTRACT,
TO_CHAR (VP. PAYMENT_DATE, 'YYYY') P_YEAR,.
TO_CHAR (VP. PAYMENT_DATE, 'Q') P_QTR
AMOUNT_PAID_ $0
TO CONFIRM. VSTATE_PAID_AWARD_VENDORS AV2
WHERE
There is not (SELECT 'X'
TO CONFIRM. VSTATE_VENDOR_PAYMENTS VP2
WHERE av2.po_number = vp2.po_number
AND (TO_CHAR (VP2. PAYMENT_DATE, 'Q') = TO_CHAR (VP. (PAYMENT_DATE, 'Q') )
AND (TO_CHAR (VP2. PAYMENT_DATE, 'YYYY') = TO_CHAR (VP. PAYMENT_DATE, 'YYYY') ))
- AND (TO_CHAR (AV2. (AWDATE, 'Q') = '4') *.
- AND (to_CHAR (AV2. (AWDATE, 'YYYY') = '2009') *.
TO_CHAR GROUP (NVL (AV2. TAX_ID, 999999999), '000000000').
AV2. FIRM_NAME,
AV2. BIDCLASS,
AV2. AWAMT,
AV2. SOL_MODE,
AV2. CERT,
AV2. ETHNIC ORIGIN,
AV2. PO_NUMBER_FORMAT,
TO_CHAR (VP. PAYMENT_DATE, 'YYYY') P_YEAR,.
TO_CHAR (VP. PAYMENT_DATE, 'Q') P_QTR

Tamir

Tags: Business Intelligence

Similar Questions

  • How to create a folder compressed uncompressed, not on my desk?

    How to create a folder compressed uncompressed, not on my desk?

    How to create a folder compressed uncompressed, not on my desk?
    When I right click on my desktop the popup resulting menu, which allows me to choose things that I can choose, and when I select 'New' the new popup window gives me another window of things that I can select. Not the case in this window possible selections are there a selection to create a folder that is not "compressed or" zipped ". I want a regular folder, not a compressed folder! I don't want zipped files, whenever I want to create a folder! If I want to create a compressed folder, I want you to leave a way for me to do that, I have my own reasons why I want to use the files uncompressed graciously... I'm used to be able to make the files uncompressed on this computer. I don't know what or how this change came to be. I want to just return to the way it was before.  Also, I want to know what it takes to keep it (the change) doesn't happen, or what I did to get there.

    How to create a folder compressed uncompressed, not on my desk?

    How to create a folder compressed uncompressed, not on my desk?
    When I right click on my desktop the popup resulting menu, which allows me to choose things that I can choose, and when I select 'New' the new popup window gives me another window of things that I can select. Not the case in this window possible selections are there a selection to create a folder that is not "compressed or" zipped ". I want a regular folder, not a compressed folder! I don't want zipped files, whenever I want to create a folder! If I want to create a compressed folder, I want you to leave a way for me to do that, I have my own reasons why I want to use the files uncompressed graciously... I'm used to be able to make the files uncompressed on this computer. I don't know what or how this change came to be. I want to just return to the way it was before.  Also, I want to know what it takes to keep it (the change) doesn't happen, or what I did to get there.

    Microsoft did not change this, Chrome has done. Compressed files shouldn't be there, but you have lost the regular folder option. It is an update of Chrome, (mid), is responsible. Here are two patches.

    How to remove and restore the default context Menu items 'New' in Windows 7 and Windows 8
    http://www.SevenForums.com/tutorials/28677-new-context-menu-remove-restore-default-menu-items.html

    If still no joy, see the 'response' by Linda Yan in this thread.
    http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/thread/97de8a2a-12f2-4381-A409-a78f4ae551cf/#99395761-56de-4a76-8C2A-eab498ad735a

    Tip: When you save the text in Notepad, the default file format is .txt. Replace all files.

  • How to create images that react to the size of the browser (and not to the device)?

    How to create images that react to the size of the browser (and not to the device)?

    Hello

    Please try this widget.

    http://widgets-musethemes.BusinessCatalyst.com/tb032.html

    Concerning

    Vivek

  • How to create a folder that is NOT a SMART FOLDER?

    (1) how can I create a folder that is NOT a smart folder?

    (2) how can I get a folder to display the NUMBER of items it contains?

    https://support.Apple.com/kb/PH22185?viewlocale=en_US & local = en_US click the blue details.   It's Apple records guide.

  • How to create new folder Mozilla Thunderbird

    I just started using it for my emails. I have my original files from windows live, but cannot see how to create another new. Help would be very appreciated.

    Right click on a folder in the folder - new folder (or subfolder) pane

  • How to create a folder 'network '.

    Can someone tell me how to create a network folder.  The cmdlet New-file that does not provide an option, but still under the vSphere 5.1 Webclient which is an option.

    I am trying to automate the creation of files, dvSwitches and dvPortGroups.  Can do the rest, I can't understand how to create the network folder that is really the first thing I want to do.

    Any help would be greatly appreciated.

    See you soon

    Ant

    Hello, IMMIAnt-

    You can use the place setting - new-folder.  To create a network folder in a given datacenter, do something like:

    ## new network folder in the given datacenterNew-Folder testInNetwk -Location (Get-Datacenter myDC0 | Get-Folder network -NoRecursion)
    

    And, to create a right to file in the root (not in a data center), you can do:

    ## folder at the root of the vCNew-Folder testFolder -Location (Get-Folder -NoRecursion)
    

    What to do what you are after?

  • How POST (create) a folder using CMIS REST in Webcenter

    Someone has already tried to create a new folder using calls to the CMIS REST/Atom in Webcenter?

    Here's what I'm trying to do:
    http://172.31.100.150:7001 / cmisrestprelim, cmis, children, MyContentServer == > POST (using the REST client plugin Firefox)

    Content-Type = application/atom + xml

    <? XML version = "1.0" encoding = "utf-8"? >
    < Xmlns = "http://www.w3.org/2005/Atom" entry
    xmlns:cmisra = "http://docs.oasis-open.org/ns/cmis/restatom/200908/".
    xmlns:CMIS = "http://docs.oasis-open.org/ns/cmis/core/200908/" >
    mytestfolder < title > < /title >
    < cmisra:object >
    < cmis:properties >
    < cmis:propertyId propertyDefinitionId = "cmis:objectTypeId" > < cmis: value > cmis:folder < / cmis: value > < / cmis:propertyId >
    < / cmis:properties >
    < / cmisra:object >
    < / Entry >

    This piece of code should create a folder called "mytestfolder" in the root directory.
    When I this POST, I get the following internal server error:
    < pre > javax.servlet.ServletException: com.sun.jersey.api.container.MappableContainerException: com.bea.content.RepositoryException: Please specify a valid ID object. Make sure that the name of the repository is not null.
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:310)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:314)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:239)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:94)
    ...........

    Someone has any idea how to solve this problem?

    The entry atom you post must have an createable (cmis:objectTypeId) file type, for example:


    xmlns:cmisra = "http://docs.oasis-open.org/ns/cmis/restatom/200908/".
    xmlns:CMIS = "http://docs.oasis-open.org/ns/cmis/core/200908/" >
    mytestfolder


    / usbohp380-10 / IDC:Folder


    To search for a folder can be created, you'll want to do a GET on a URI as follows:
    http://172.31.100.150:7001/cmisrestprelim/cmis / typesChildren/MyContentServer/cmis:folder
    Which returns an atom feed with entries atom.
    Each of these entries will be a child type in cmis:folder, and when you inspect each entry, you will be looking for a w /.
    true

    I have never had much luck using web browsers for strolling through the AtomPub type links.
    There might be a rest client tool or a tool customer atom that will allow you to see the actual xml text that is returned.

    If you're going to do a lot w / CMIS, it would be interesting to look at the specifications:
    http://docs.oasis-open.org/CMIS/CMIS/v1.0/CS01/CMIS-spec-v1.0.html
    And documentation accompanying Oracle:
    http://www.Oracle.com/technetwork/middleware/WebCenter/documentation/e15813-01-128494.PDF

  • How to create an accordion for a report that shows one of

    Hi all

    How can we create an accordion in a report that shows the details of the line in a form below, and then when we push the button of Update of the form, it must update the columns close the accordion and update this one line in the report.

    I have seen two examples

    http://HTMLDB.Oracle.com/pls/OTN/f?p=11933:131:1811032969809934:no:RP:

    http://HTMLDB.Oracle.com/pls/OTN/f?p=11933:77:1811032969809934:no:RP:

    Secondly a loading actually a new page but I do not know how to update the form, and then close the accordion region and then refresh the single line. Here pointers will be of great help.

    Thank you and best regards,
    Vikas

    Vikas,

    I slightly modified on of my examples alumni and you will find everything here:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:241

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • BlackBerry smartphone how to create a folder in 9860

    Hi all

    Can someone tell me if we have an option to create a folder, if so, please guide me on this

    Concerning

    Austin

    Hi Austin

    Click the 'documents' black. If you have not yet created all the files, I think it will open under the folder titled 'Up', which turns blue upward.

    Now click on the button on the left under the BB side on this.  Select "Add folder..."

    You now have the first branch of your tree - call professional docs.  Back to the top, add a folder - call this second branch "Personal docs.  You can create subfolders within those, always using to add a folder.

  • How to create a folder of images in window 8?

    We have recently upgraded to Windows 8. I added photos to my computer from another site and wish to organise in a folder. I can't figure out how to make a folder for these photos.

    «Open "File Explorer" > in libraries expand 'Photos' > click right on ' my images ' > select 'New' and then select ' folder ' > a "new folder" will appear in the "My pictures" folder > R / click the folder and select ' Rename ' > type name and then press on ' Enter»»

    Then copy your photos to the new folder name (once you have copied to the new folder you can then delete them from their old location).

    or you can "Hold, drag & drop ' hence the photos are in the new folder.

  • How to create the new Custom XML report without the use of the form builder

    Hello

    What are the steps to create the new Custom XML report without using the Report Builder?

    Thank you and best regards,
    Aerts

    Aerts,
    Can you clarify your question more away!

    -bifacts
    http://www.obinotes.com

  • How to create a folder in the file system?

    Hi all
    How to create a normal file in the file of my PC system in a specific path?

    Host just passes the commands to the operating system; the simplest way to try would play a bit in the shell to understand what does not work...

    C:\>dir "I am"*
     Volume in drive C is System
     Volume Serial Number is 5C03-B54D
    
     Directory of C:\
    
    File Not Found
    
    C:\>cmd /c mkdir "c:\I am a directory"
    
    C:\>dir "I am"*
     Volume in drive C is System
     Volume Serial Number is 5C03-B54D
    
     Directory of C:\
    
    09/21/2010  02:38 AM              I am a directory
                   0 File(s)              0 bytes
                   1 Dir(s)     509,628,416 bytes free
    
    C:\>cmd /c mkdir "c:\I am a directory"
    A subdirectory or file c:\I am a directory already exists.
    
    C:\>
    

    or with the built-in host

    host('cmd /c mkdir "'||full_path||'"');
    

    But first, you need to check if the directory already exists as mkdir will throw an error if it exists, as you can see.

    see you soon

  • I am trying to copy a file to another folder, I have the file open, how do the other folder along the side so I can drag and drop

    I have a file on a cd - rw that I try to copy to a different folder, I open the file, but how can I get the new folder the long side so I can drag and drop

    Hi tommckeith,

    ·         What version of the operating system is installed on the computer?

    ·         You try to move the file on the CD to the computer or inside the CD?

    If you want to move the file on the CD for computer, follow the steps in the article.

    Move and copy files using drag and drop

    http://Windows.Microsoft.com/en-us/Windows7/move-and-copy-files-using-drag-and-drop

    Copy and paste a file

    http://Windows.Microsoft.com/en-us/Windows7/copy-and-paste-a-file

    If you try to move the file to the CD, then it is not possible to make changes on the data stored in the CD. You must copy the data to the computer, and then make the necessary changes. You can also make the changes before saving the data to a CD.

  • How to create a ViewObject attribute where value to get database query

    Hi Expert,

    I have a case for the value of database query. How to create the view additional attribute object where the value get database query?

    parameter binding of attributeId object in view I can do this in ADF with JDeveloper 11.1.1.6.

    Thank you

    Kind regards

    Wade W

    My problem is solved, maybe it's a bug in the JDeveloper 11.1.1.6.0

    I've got error (oracle.jbo.expr.JIEvalException) Houston-25077: name amount not found in the given object: oracle.jbo.server.ViewRowSetImpl@8690e3.

    When I develop by tab Overview (presentation of the business components). It is so strange, because I have an another transient viewAttribute that refer to another object in view and not get an error message like this before I create viewAttribute HeaderAmount.

    Maybe its ridiculous appearance, but when I go to View (lineVO.xml) object and tab to the source xml file, I have edited here. like to write

    <>

    Name = "HeaderAmount".

    IsUpdateable = "false".

    IsSelected = "false".

    IsPersistent = "false".

    PrecisionRule = 'true '.

    Type = "Oracle.jbo.domain.Number"

    ColumnType = 'NUMBER '.

    AliasName = 'VIEW_ATTR. '

    SQLType = 'DIGITAL' >

    <>

    Value = "ActivityHeaderId" / >

    and make sure this xml file are:

    <>

    Name = "ActHeaderView1VO".

    ViewLink = 'model. ActHeaderLineLink ".

    Type = "Oracle.jbo.Row"

    Reversed = 'true '.

    IsUpdateable = "false" / >

    When I try to re-run the application model and it's work...

    Thanks for your help. really appreciate

  • How to create a folder for the storage of electronic mail in a mailbox?

    How can I create a subfolder in a mailbox to store an email?

    Right click on the mailbox you want to add a folder to, and then select the mailbox from the context menu.

Maybe you are looking for

  • regular expression or string (nevermind) format

    Resolved, I can use the string to a fractional number! Hello I have an array of strings in a multicolumn list box 2D, and I want to check if each value is a valid number, numbers can be one and can have negative values. Anyone know what regular expre

  • Vista - Error Code: 802400D (cannot install updates)

    I get the 802400d error code when I try to install an update of safety for my Vista operating system.  The explanation is that I need to insert a disk 'works', which I did not install the update

  • Startup speed

    Hello world I want to speed up the time it takes to start my computer.  I understand that the lower right corner of the Office contains a list of programs that are started automatically at startup. How can I remove some of these programs to get a fas

  • Accidentally uninstalled CyberLink Media Suite 10

    Hi all I accidentally uninstalled CyberLink Media Suite 10 while trying to uninstall Cyberlink PowerDVD. How this error will affect how my phone will work in the future? Is there a way I can re - download this software? FYI: My CyberLink Power DVD ha

  • Dell Latitude 10 + 8.1 Windows Pro + Docking Station = not in position to use the LAN connection?

    I have a dell Latitude 10 that I had just upgraded to Windows Pro 8.1, everything seems to work fine except for the LAN on the docking port, I tried all the old and latest versions of the drivers 7500LANUSB out there with no success to get it to work