Can I pass parameters to a subquery to return a narrow result set?

Hi-
HERE'S WHAT I'M TRYING TO DO:
Create a worksheet to aggregate the data that's returned from a subquery result set based on the user's specified date ranges.
HERE'S MY PROBLEM:
Discoverer is aggregating the data FOR EACH PARTICULAR DATE that shows up (ie-6/1, 6/2, 6/3) instead of across the entire specified date range (ie- 6/1-6/3) because the date parameters can only be applied to the main query instead of the subquery.
In essence, I need to:
SELECT location1, task1, sum(product1), max(product2)
FROM
(SELECT * FROM table1 WHERE date1 >= userSpecifiedDate1 and date1 <= userSpecifiedDate2)
GROUP BY location1, task1
...but using Discoverer's "Parameters" and "Totals" tool, so far I can only get Discoverer to do this :
SELECT location1, task1, sum(product1), max(product2), sum(product3)
FROM
(SELECT * FROM table1)
WHERE date >= userSpecifiedDate1 and date <= userSpecifiedDate2
GROUP BY location1, task1
Is there any way to apply date parameters to the subquery first so I'm aggregating across the range and not on each date?
Hope this makes sense. Any suggestions would be appreciated!

Hi,
Yes.
You can pass parameter from search criteria to procedure.
First u need write a method in the AmImpl java class to call the procedure.
Like
public void callingProcWithinParams(String sreachCriterParam)
//pass the parameter to proc
Then shuttle this method to client interface.

Similar Messages

  • How can I pass parameters from one process flow to another process flow?

    How can I pass parameters from one process flow to another process flow (sub process) in warehouse builder? let me know the steps I have to do in warehouse builder.
    Thanks in advance,
    Kishan

    Hi Kishan,
    Please post this question to the Warehouse Builder forum:
    Warehouse Builder
    Thanks, Mark

  • How can i pass parameters to every form sucessively or repeatedly

    How can i pass parameters to every form sucessively or repeatedly
    Eg: I have username which is specified in first form
    I want to display and use the username in each and every form after that form
    please tell me how to do
    i have one solution
    i.e., Normal way to pass parameters from one form to another!
    Is any procedure to pass paramters to all form at a time???

    excellent ...
    thanks for adding up to my post ..
    You can make use of parameters
    Every forms shud have same parameter name and u pass on the values of these
    Its one of the best ways

  • How can i pass a parameter to the query to filter the result of this lookup

    Hello,
    i'm developping a web application with JDeveloper 10.1.2 and JHeadStart.
    i realy need to know how can i filter the lookup (LOV) query result.
    in other word, when i click on the lookup, it show all the row that exist in may data base table.
    what i want is how can i pass a parameter to the query to filter the result of this lookup ?
    Thank you

    Hi,
    have a look if this helps
    http://oracle.com/technology/products/jdev/tips/fnimphius/restrictlovlist/restrictlov.html
    Frank

  • Can you pass parameters to the Dashboard in a URL?

    Hi,
    I'm trying to launch a dashboard from a weblink in a new window but I can't figure out how to pass any parameters into the dashboard. I would like to set the prompt or the presentation variable or anything that could be used to filter the results of the 4 reports running in the dashboard. Right now the dashboard comes up with all results from all accounts and I want just results from the account with the weblink.
    Is this possible?
    thanks

    Ok,
    I just tried that and it still doesn't pass anything to the prompt.
    I changed the prompt to an edit field and I made the following weblink but when i click the link from an account it doesn't put anything in the prompt and all data for all accounts is shown.
    This is the URL maybe I messed something up...
    https://secure-ausomx###.crmondemand.com/OnDemand/user/Dashboard?OMTHD=ShowDashboard&OMTGT=ReportIFrame&SelDashboardFrm.Dashboard Type=%2fshared%2fCompany_########_Shared_Folder%2f_portal%2f360+Report&Option=rfd&Action=Navigate&P0=1&P1=eq&P2=Account."Account Name"&P3=%%%Name%%%
    thanks

  • Why I can't pass parameters into CR from VB6

    I want to Pass parameters into crystal report from VB6.
    But whatever I try, it don't work Fine,
    always Show the message "This field name is not known".
    Crystal Report::
    Parameter: a.@cmpy;
                       b.@p1
    formula:
    a. If {?@cmpy} ="USA" or {?@cmpy} ="usa" then
          "This is test 1 sentences"
       else if {?@cmpy}="TWD" or {?@cmpy} = "twd"  then
          "This is test 2 sentences"
    b. if trim({?@p1})="1" then "This is test 3 sentences"  
    VB::
    Public oApp As New CRAXDDRT.Application
    Public oRpt As CRAXDDRT.Report
    oRpt.ParameterFields(1).ClearCurrentValueAndRange
    oRpt.ParameterFields(2).ClearCurrentValueAndRange
    oRpt.ParameterFields(1).AddCurrentValue ("TWD")
    oRpt.ParameterFields(2).AddCurrentValue ("1")  
    I had trid to use "IsCurrentValueSet" function to check whether parameter was set or not, and It responsed "Ture",so I so confused about it.
    Anyone know about this??
    ps. I had trid other way that change the formula indirectly, although it can work fine, but it isn't a right way to solve my problem.
    Edited by: DeanLai on Jun 22, 2010 8:54 AM

    I Find something.
    First I tried to add parameter and wanted to see these value on Report.
    So I inserted {?@cmpy} and {?@p1} into report, and used VB code
    "oRpt.ParameterFields(1).AddCurrentValue ("TWD")" and "oRpt.ParameterFields(2).AddCurrentValue ("1")",
    then ran the process, but it didn't display any value on report,
    so why it couldn't pass value into parameter??
    then I tried other way which was to add new parameter, and used the same way to pass
    value into parameter, then it can display value on report.
    So the different between these is {?@cmpy} and {?@p1} which come from
    Stores Procedure.
    While I set Database in crystal report, set all value into Store Procedure's
    parameter(the window about "Enter Parameter Values"), then it automatic come out the DB columns and parameter(SP parameter)
    , course include {?@cmpy} and {?@p1}.
    Do this problem cause my question?
    Can we pass value into parameter which come from SP parameter??
    Can we use these parameter into forumla??
    Edited by: DeanLai on Jun 30, 2010 11:56 AM

  • Can I pass parameters from Procedure to omniportlet?

    hi,
    i have an Omniportlet that I need to pass a parameter of Employee Number.
    I create a procedure in PLSQL after that i make a Form based in this procedure, To use the Employee Number and I can pass this parameter to a form and it works, however I can't pass the parameter to the Omniportle.
    Can somebody help me?

    Hi,
    Program unit syntax :
    PROCEDURE sample(blk_nm varchar2,itm_nm varchar2,btn_nm varchar2) IS
    ---local variables declaration (if any)
    begin
    end;
    To call program unit from trigger:
    sample ('myblock','myitem','mybutton');
    Suresh
    null

  • Can we pass parameters using Personalization?

    Using Personalization options ,Can we pass a parameter from existing jsp to the custom jsp url given in the button/link added through personalization?e.g if A is existing jsp and B is new(custom jsp)added for button,then on the click of the button, can B take parameter from A?

    I am also looking for a solution to this.
    I am trying to pass a parameter from JTT jsp Menu link to OA Framework Page.
    Thanks
    Srini

  • Can i pass parameters in calling an action through JS/VBS?

    Hi all,
    How can i pass arguments in calling an action through VBS?
    I have to find any set of fonts & replace with any another set of fonts.
    Im trying to do this in action.How can i pass paramaters?
    myRiaz

    i too want the same..
    how to do that ?
    thanks
    subha

  • How can I use ONE Text search iView to event/affect mutliple Result Sets?

    hello everyone,
    i have a special situation in which i have 6 flat tables in my repository which all have a common field called Location ID (which is a lookup flat to the Locations table).
    i am trying to build a page with a free-form text search iView on Table #1 (search field = Location ID).  when I execute the search, the result set for Table #1 is properly updated, but how do I also get Result Set iViews for Tables #2-6 to also react to the event from Text Search for Table #1 so that they are updated?
    i don't want to have to build 6 different text search iViews (one for each table).  i just want to use ONE text search iView for all the different result set tables.  but, in the documentation and iView properties, the text search iView doesn't have any eventing.
    if you have any suggestions, please help.
    many thanks in advance,
    mm

    hello Donna,
    that should not be a problem, since you are detailw with result sets and detail iviews because custom eventing can be defined for those iviews.
    Yes, it says "no records" found because an active search and record selection havent' been performed for it (only your main table does).
    So, yes, define a custom event, and pass the appropriate parameters and you should be fine.
    Creating a custom event between a Result Set iView and an Item Details iView is easy and works. I have done it.
    See page 35 of the Portal Content Development Guide for a step-by-step example, which is what I used.
    For my particular situation, the problem I'm having is that I want the Search Text iView's event (i.e., when the Submit button is pressed) to be published to multiple iViews, all with different tables.  Those tables all share some common fields, which is what the Search iView has, so I'd like to pass the search critera to all of the iViews.
    -mm

  • Access Subform - Can the Subforms Source Object be defined by an SQL SP result set?

    Hi Guys,
    I can't clearly answer this question with a yes or no.
    I have an Access Sub Form that I am populating with a record set from a Store Procedure. Fairly early on I discovered that for this to work correctly the Source Object for the Sub Form Control must be set first, and most examples (including a working version
    of my own) achieve this by defining an Access Query and setting the Source Object to this.
    What I would really like to do is define the Source Object using the results of a SQL Store Procedure using ONLY code within VBA.
    Now before anyone starts providing alternatives "why don't you just..."  I'm noting now that I have a semi complex solution that makes most non-VBA based approaches ineffective. While it does work at present with an Access Query I'm needing
    to make the result set more dynamic meaning in future I will not know how many columns will be returned or the name of them, only the SP will have this information.
    Thanks in advance!

    Well after much trial and error I've got something which does what I want, although I'm not thrilled that I couldn't do this via my existing ADODB connections, in any case example provided below;
        Dim db As DAO.Database
        Dim qdf As New DAO.QueryDef
        Set db = CurrentDb()
       'qryMyTest refers to a dummy Access query (non pass through). 
        With db.QueryDefs("qryMyTest")
            .Connect = CurrentDb.TableDefs("tblSomeTestSQLTable").Connect
            .SQL = "exec sp_MyTestSP"
            Me.subfrmTest1.SourceObject = "Query.qryMyTest"
        End With   
        Set qdf = Nothing
    I've also marked your response Alphonse as an answer as it lead me onto the right path.

  • How can I use a Lookup task to lookup from my SQL Result set and have a join

    So in my Control Flow, I have an Execute SQL Task which gets my Table result set. I then have a Foreach Loop Container that iterates through the result set and a Data Flow. The first task in the Data Flow is an OLE DB Source SQL Command that retrieves data
    columns associated with my result set. I then do a Derived Column so I can SUBSTRING from one of my data columns and now I want to perform a Lookup to my Application Database.
    How do I code my Lookup task to utilize my SQL Result set variable and match on it? I cannot use the GUI for the Lookup task as my Lookup has to have some JOINS in it.
    Thanks for your review and am hopeful for a reply.

    Can you expand on that? I'm sorry but I am new and a novice to the SSIS world and I want to do this as best I can and as efficiently as I can. Are you saying that Rajen's way suggested above is the way to go?
    A little background....external data from a 3rd party client. I'v staged that external data to a SQL Server staging table. I have to try and match that data up to our database using SSN, DOB, and Gender...and if I can't match that way then I have to try
    and match by Name. I need to make sure that there is only one and only one account for that match. If I cannot match and match one and only one, then I'll create rows on a DataAnomaly Table. If I do match, then I have to check and make sure that there is only
    one and only one Member span for that match. Similarly handle the data anomaly and then check and make sure there is a "Diabetes" claim and similarly handle the DataAnomaly accordingly.
    That's where I'm at. Sooooo are you saying to use Rajen's suggestion? I don't think I can do that because I need multiple SQL tasks and I cannot connect multiple OLE DB Source tasks.
    Any help and suggestions are greatly appreciated.
    Thanks.

  • How can I pass parameters directly to report in web envirnment

    Hi
    I want to call reports by skipping the parameter form in web enviroment.
    for example I m caling a report inv.rep with parameter userid=1 what I want is
    when user clicks the button(on oracle forms) it will get that report sort on userid=1 without displaying the param form to user.
    I m using web.show for this purpose with parametr form every thing is working fine but I want to hide tht paramform and process the parameter setinng in bacground.
    CODE Tht I m Using
         v_url := 'http://appserver/dev60cgi/rwcgi60?rep+inv.rep';
    web.show_document:=(v_url)
    this shos the param form with user id
    how can I skip it and set user id directly
    Any Tip or suggestions ??
    Thnx in Advance

    Hi all
    I'm having the same problem! Im defining a key in "cgicmd.dat" like
    my_key : userid=user/pass@db
    and Im calling the report using a url like
    http://appserver.com/ows-bin/rwcgi60.exe?my_key&report=name.rdf&destype=cache&desformat=pdf&server=Rep60_SERVER
    and what I get? Error: "Oracle Reports Server CGI - Reports Server name is not specified."
    Ive changed my_key to
    my_key : userid=user/pass@db report=name.rdf destype=cache desformat=pdf server=Rep60_SERVER
    and works fine ...
    Problem:
    My problem is that I need to pass more parameters in the url to run the report. Parameters like "p_dept=10"
    http://appserver.com/ows-bin/rwcgi60.exe?my_key&p1=something&p2=whatever
    Report, however isnt receiving the parameter p1 and p2.
    And using the complete url
    http://appserver.com/ows-bin/rwcgi60.exe?userid=user/pass@db&report=name.rdf&destype=cache&desformat=pdf&server=Rep60_SERVER&p1=something&p2=whatever
    works ...
    anyone knows a way to turn this question?
    I only need to get the user/pass@db out from the url ....
    thanks in advance
    Bruno Rabino
    Hi Sami
    I guess something wrong in your CGICMD.DAT entry
    Can you cut and paste what exactly you have in that file for the mapkey
    It has to be something like
    mapkey: userid=scott/tiger@db
    Thanks
    Oracle Reports Team

  • Can you pass parameters with sub queries

    I have created a Custom folder within a Business Area using a sql query that has multi sub queries. I need to be able to pass date parameters at the top level and at each sub query levels. Is this possible, or how can it be done in Discoverer?
    I have attached an example of the query below.
    select T.title_type_code, T.title_number
    from title_trans T
    where T.title_type_code in ( 'A', 'AC', 'AN','AS','EL', 'ERL','SEL', 'MC', 'MCN', 'MCC', 'MCS', 'ML', 'MLN', 'MLC', 'MLS')
    and T.trans_type_code = 'APPL'
    and trunc(T.effective_date) between to_date('&start_date','DD/MM/YYYY') and to_date('&end_date','DD/MM/YYYY')
    and exists
    (select *
    from title_land_status L     
    where T.title_type_code = L.title_type_code
    and T.title_number = L.title_number
    and L.trans_type_code in ('APPL', 'FLS', 'AVAR')
    --FREEHOLD LAND
    and L.land_status_id in ('15')
    and L.date_completed = (select MAX(L.date_completed)
    from title_land_status L
    where T.title_type_code = L.title_type_code
    and T.title_number = L.title_number
    and trunc(L.date_completed) <= to_date('&end_date','DD/MM/YYYY')
    and L.trans_type_code in ('APPL', 'FLS', 'AVAR')))
    and not exists
    (select *
    from title_land_status L     
    where T.title_type_code = L.title_type_code
    and T.title_number = L.title_number
    and L.trans_type_code in ('APPL', 'FLS', 'AVAR')
    --AB fREEHOLD LAND - NLC, CLC, TLC, ALC
    and L.land_status_id in ('3', '4', '5', '6')
    and L.date_completed = (select MAX(L.date_completed)
    from title_land_status L
    where T.title_type_code = L.title_type_code
    and T.title_number = L.title_number
    and trunc(L.date_completed) <= to_date('&end_date','DD/MM/YYYY')
    and L.trans_type_code in ('APPL', 'FLS', 'AVAR')))
    and not exists
    (select * from title TIT
    where T.title_type_code = TIT.title_type_code
    and T.title_number = TIT.title_number
    and TIT.purpose = 'EMPC')
    order by T.title_type_code;

    Ok,
    I just tried that and it still doesn't pass anything to the prompt.
    I changed the prompt to an edit field and I made the following weblink but when i click the link from an account it doesn't put anything in the prompt and all data for all accounts is shown.
    This is the URL maybe I messed something up...
    https://secure-ausomx###.crmondemand.com/OnDemand/user/Dashboard?OMTHD=ShowDashboard&OMTGT=ReportIFrame&SelDashboardFrm.Dashboard Type=%2fshared%2fCompany_########_Shared_Folder%2f_portal%2f360+Report&Option=rfd&Action=Navigate&P0=1&P1=eq&P2=Account."Account Name"&P3=%%%Name%%%
    thanks

  • Can we pass parameters back and forth between Captivate 4 and a homegrown LMS?

    We are currently using a home grown LMS and ToolBook. At the beginning of every training course we are passing several parameters to ToolBook using a getparameters function and sending several parameters back to the LMS from our ToolBook assessments using HTTP Post.
    We are in the process of elavuating Captivate 4 and we need to be able to do something similar to what we are currently doing with ToolBook. At the start of each training session we need to be able to send several pieces of information (user ID, return URL, etc. etc,) from the LMS to Captivate and at the end of each assessment we need to be able to send several pieces of information back (user ID, pass/fail, score, etc.) to the LMS. We do not need to display any of the information brought into Captivate.
    Is it possible to do this using Captivate user-defined variables and HTTP? If so, can anyone out there give us some pointers on exactly how to accomplish this. If not, is there any way that this can be done with Captivate?
    Any help will be greatly appreciated.
    Thanks,
    Vernon . . .

    I don't really have any examples at hand but the basic process would be something like this.
    1. Create the user defined variable in your Captivate project. Publish your project.
    2. Edit the HTML file and add your JavaScript to send that information into the Captivate user defined variable. I can't remember the exact JS code for that but perhaps you can see that from the link Rick posted. If not then that information can definetly be found on www.pipwerks.com and I think he has a couple of examples as well (check out the "Lab").
    That should really be it.
    /Michael
    Visit my Captivate blog with tips & tricks, tutorials and Widgets.http://www.cpguru.com/

Maybe you are looking for

  • Sales set in Retail and BOM explosion in sales order

    Greetings. I configured a sales set that contains variants of generic articles and also unique articles as follows: Sales set: distinct code, LUMF - item category group, gets TAQ item categ in SO; it contains: - Var 1 of article X, distinct code, NOR

  • Exception handling best practice

    whats the best practice for exception handling on ? - BC -controller -view layer (Managed beans) do we have to handle commit operations on BC so we can rollback like this code public void save() // create/update/delete ROW try this.getTransaction().c

  • Intermittent access issue with Oracle Applications EBS R12.1.3 URL

    We are facing intermittent access issue with EBS R12.1.3 URL .There are no errors generated in the access log and the IP from which we are using to access is the URL does not appear in the access  log either. 1. No of concurrent users : 10 at a time

  • Ideal adc

    Hi all,     I'm trying to find some ideal ADC to run the simulation.  I want to add jitter to the sample signal. However, the analog to digital.vi cannot use sample signal.  It's helpful to tell me what should I do. Best Regards, Laffer

  • System session variable USER

    Hi, i have setup-ed the action links and used the USER variable for the EBS secuirty context init block as this EBS_RESP_ID EBS_RESP_APPL_ID EBS_SEC_GROUP_ID EBS_RESP_NAME EBS_USER_ID EBS_EMPLOYEE_ID USER Now for the sso configuration in the RPD i ne