Query from a Query

Hi,
We have a table with a list of Centers (the town our offices
our located), I query this to get my list of centers and load it
into a Javascript array to display it in a dropdown box.
What I would like to do is generate seperate queries to get
the managers from each center into their own Javascript array but
make the name of the cfquery dynamic based on the city from the
previous cfquery.
I hope that makes sense.
Thanks in advance.

Sounds more complicated than it needs to be. Especially the
javascript part, what makes that necessary.
It would be simpler to make sure the original query is
ordered by the CenterID field, what ever you call it. Then with one
loop and a bit of if/else logic you should be able to do anything
you want.

Similar Messages

  • Unable to run query from BEx query designer

    Hello,
    I am connecting remotely to clients environment. I am not able to run query from Bex query designer. System generates IE window with URL
    http://server.com:50300/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=ZCOPCM02_Q017&VARIABLE_SCREEN=X&DUMMY=9
    but query result isnt shown.
    Internet Explorer cannot display the webpage.
    What kind of setting do I need to change to get query working?
    thanks

    Hi Comandante,
    If you are not able to Execute the Query using Query designer, you can also execute the query using RRMX  or RSRT transaction for now until the issue with the query designer is solved ..
    Hope it helps!
    Regards,
    Pavan

  • Select column in main query from sub query (derived table) -

    Hi:
    I have the following query - How do I select Tot_Atnd defined in the derived table
    SELECT  count(distinct c.prgm_id) AS "Total Completed", h.Tot_Atnd
    FROM  iplanrpt.vm_rpt_prgm  c
    INNER JOIN
    *(SELECT PRGM_ID, SUM(CASE WHEN ATTENDED_IND = 'Y' THEN 1 ELSE 0 END) AS "Tot_Atnd" FROM iPlanrpt.VM_RPT_PRGM_ATND GROUP BY PRGM_ID) h*
    ON c.PRGM_ID = h.PRGM_ID
    Thanks

    Here's an example of what I think the CREATE TABLE and INSERT statements would look like for your data:
    CREATE TABLE     vm_rpt_prgm
    (     prgm_id     NUMBER
    INSERT INTO     vm_rpt_prgm
    VALUES     (1);
    INSERT INTO     vm_rpt_prgm
    VALUES     (2);
    INSERT INTO     vm_rpt_prgm
    VALUES     (3);
    INSERT INTO     vm_rpt_prgm
    VALUES     (1);
    INSERT INTO     vm_rpt_prgm
    VALUES     (1);
    INSERT INTO     vm_rpt_prgm
    VALUES     (3);
    CREATE TABLE     vm_rpt_prgm_atnd
    (     prgm_id     NUMBER
    ,     attended_ind     CHAR(1)
    INSERT INTO     vm_prt_prgm_atnd
    VALUES     (1, 'Y');
    INSERT INTO     vm_prt_prgm_atnd
    VALUES     (1, 'N');
    INSERT INTO     vm_prt_prgm_atnd
    VALUES     (2, 'Y');
    INSERT INTO     vm_prt_prgm_atnd
    VALUES     (2, 'Y');
    INSERT INTO     vm_prt_prgm_atnd
    VALUES     (2, 'N');
    INSERT INTO     vm_prt_prgm_atnd
    VALUES     (3, 'Y');
    INSERT INTO     vm_prt_prgm_atnd
    VALUES     (3, 'N');
    INSERT INTO     vm_prt_prgm_atnd
    VALUES     (3, 'N');But, I don't know your data. The sample data should be a simplified case of reality that represents (as best as possible) the real data set. For example, in vm_rpt_prgm, can the same prgm_id show up in multiple records? If not, the sample data I provided above is not representative of your data. Similar questions for vm_rpt_prgm_atnd: Can the same prgm_id show up in multiple records? Are the values of attended_ind 'Y' or 'N'? Can there be prgm_id's that exist in this table, but not the other? If not, again, my sample data is not representative of yours, so adjust it as needed and re-post it.
    Here's some quick summary information on my sample data above:
    There are 3 distinct values of prgm_id in vm_rpt_prgm.
    There are 4 distinct values of prgm_id in vm_rpt_prgm_atnd.
    There are 6 rows/records in vm_rpt_prgm.
    There are 9 rows/records in vm_rpt_prgm_atnd.
    The count of all 'Y's in vm_rpt_prgm_atnd is 5.
    The count of all 'Y's in vm_rpt_prgm_atnd for only the prgm_id's in vm_rpt_prgm is 4.
    So, which of these things (or other things) do you want to see in your result set?
    You might say you want to see:
    COUNT_OF_UNIQUE_PRGMS     TOTAL_ATND_YS
    3                    4or...
    PRGM_ID     TOTAL_ATND_YS
    1          1
    2          2
    3          1
    4          1Once you clearly specify what you want, I can probably help you

  • Mantaining closed the query structure when launching a query from "query mg

    Hi,
    Is it possible to maintain closed the query structure window when launching a query from the "Query manager" menu?
    As say, if I want to see the query syntax, I must click on the "Display query structure" symbol.
    Now the query results windows, always starts with the "query structure" opened. 
    Thanks
    Antonio

    Hi Antoni,
    Only system built-in queries allow that.  We could not control this button to hide query by default.  You may post it as a DRQ on this forum:
    /community [original link is broken]
    Thanks,
    Gordon

  • Query from query?

    Hello gurus,
    I had a request for a report that seem to be easy to implement in ABAP and I am not sure that it is also easy in the Query Designer, but as I am quite new in SAP BW reporting I am surely mistaken.
    So assuming I have a Purchase Order items ODS with the following data:
    - PO number
    - PO item
    - PO date
    - material group
    - [counter]
    ... I want to have a report that presents the following data for a given period:
    - material group
    - number of purchase oprders (not po items!)
    If it was possible to create a query from a query, it would be easy. Is it easy anyway?
    Cheers,
    Michal

    Michal,
    One way is to see update a new counter on the posibility of PO Number 1st record as 1 and Other line items as 0. and use this counter in the reports..
    Option 2: Not sure that this will work..
    1. Create a new Formula/selection on Count and in the properties..select 'caliculate result as first value..'
    regards,
    Hari

  • Error creating Universe from BW query

    Hi
    Creating the Universe connected to BW query (BI 7).   
    Connection is proper and universe designer is connected to BW system without any problem.   I have already used many queries to connect to universe and webi documents has been developed.   
    The only difference in this BW query is,  it is using hierarchy with 'derivation type'  in 'select hierarchy date'.
    BW query is working as expected in BEx designer.
    This is the error message when trying to create the universe from BW query -
    Error getting dimensions for cube <infoprovider name>/<query name>(catalog <infoprovider name>): Unknown error when executing MDX
    Product name : SAP BusinessObjects Enterprise XI 3.1 Client Tools SP3
    Please respond how this can be resolved.
    Thanks
    Sreedh

    Sreedh,
    I was wondering whether you could resolve this error?
    Would appreciate if you can convey the resolution.
    I am getting the same error - ( BOE XI 3.1 ).
    Thank you,
    PK

  • How do I stop a query from running when the page is loaded

    Hi All,
    I'm using JDeveloper 10.1.3.4. I have a JSPX page that is used to collect search parameters and then when a button is clicked uses those values to run a query and then populate a table on the same page. The problem is that when the page is loaded the system attempts to run the query. The query is a method in a session bean. I can keep the method from running the query code by wrapping it in an 'if' statement and checking the parameters for null (or other value). Once the parameters are collected the query is invoked but it looks like the method is running twice, once with the parameters (here I've checked that the result actually has rows in the list) and then again where the parameters are null and the method returns null.
    What is the best way to do what I want here? From the buttons action method I am called the session beam method and returning null to stay on the same page. I think that is why the method is running the second time and returning null.
    TIA,
    Dave

    Have a look at these screen casts from Steve Muench and see if one of these techniques works for you, or gives you the clue you need.
    Creating Three Simple Search Pages with ADF Business Components and ADF Faces (JSF)
    Part 1: Web-Style Search Form
    Part 2: Oracle Forms-Style EnterQuery/ExecuteQuery Mode Page
    Part 3: Search Form Using View Object with Named Bind Parameters
    I had trouble viewing these with Firefox, but they worked in Internet Explorer.

  • Query from master data

    I am trying to create a structure to create a query as follows from 0EMPLOYEE master data. I have ceated a BI infoset with 0EMPLOYEE and using that to create this query. This query is intened to be used as the receiver query in RRI.
    Sender Query (query1):
                                  Employee Distribution by perfromace rating
    Performance Rating  Before_Min Below Above Total
    Receiver Query (query2) : this should feed the employees used in query1 and get their attributes in a query
    Employee       Last_Name First_Name, Annual_Salary
        A
        B
    Qns:
    1, What is the best approach to get this?
    2. How do I create a characteristic query for Employee (without key figures) as in qurey-2
    Amy help is apprecaiated.
    Thanks in advance

    Hi Bob,
    Thanks for your message. I got the receiver query working by configuring the infoobject as a infoprovider and getting "# of records" as the dummy KF into the query and hide it. I need to clean up to supress results reow.
    For connectign to this query as RRI, in the assignment details, do I use it as an Infoobject - parameter for 0EMPLOYEE or any other setting. I used the above settings and see more employees in the list than I had expected. i don't see the employee ids being passed on from Q1 to Q2 to provide a reduced result set when I limit the scope in q1 (eg: by filtering using the org unit or personnel area).
    Any clues?
    Thanks
    Raj

  • Set/get variables with RSBBS from  query 1 to query 2

    Hi BW Experts,
    I created a sender/receiver assignment from query 1 to query 2 using RSBBS. For two characteristics I assigned the processing method by “Variable”. Process mode for these variables in the receiver query is by “customer exit”. But I don’t know how to set/get values of these variables.
    Is there any function module to do it ??
    Please help!!
    Dev

    thanks...but i m not used in RSBBS and i m afraid i m lost
    could anyone explain me in detail :
    - what i have to do for setting the sender & receiver,
    - before to set parameter ID in the sender how to get the information of the current line (which will serve for the jump)
    please help! i promise points
    Dev

  • How to display first row value returened from a query as checked as default in a report

    How to display first row value returned from a query as checked as default in a report
    Example
    Parameter 1
    Paramerter2
    ABD
    x(checked)
    Test
    DEF
    JMG
    Mudassar

    Hi Mudassar,
    The issue is caused by the order in which the parameters appear in the report data tab can be difference between our report execution and it failing. In other words, “Parameter2” is execution before parameter “A” due to this issue. We can adjust the parameter’s
    order to solve the issue.
    If “Parameter2” is parameter “A”, we cannot use that expression. Because fields cannot be used in report parameter expression, if we want to display the first value returned from a query as default value, we have to fill the “Specify values” text box with
    the specific value in Default Values dialog box.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • IR Dashboard report from new query not getting all Quick Filter selections

    I inherited an IR Dashboard .bqy and my user recently added a new Query, Result, Table, and Report section to it. I cannot get the report to dynamically filter based on the date chosen in the existing Quick Filters section. It seems to be filtering the Location properly (drop down in Quick Filters section), but not the date. Her result section refuses to show anything less than ALL dates from the query.
    The other reports/pivots already on the dashboard work fine with all QuickFilters.
    In my attempt to integrate her new report in to the dashboard I add a new hidden "dummy" pivot (based on the existing query btw, not the new query-could that be the issue? it's dummy though so i figured it was ok), reference this pivot in the Embedded Targets object I found by adding "Object~Pivot4|Type~9|Target~Casket Margin Summary" line,
    went to Dashboard Studio and was able to Associate this report in to the right frame, etc.
    In the script behind the QIQ date "Set Filters" button I saw this code for the existing "Result_Detail" section so I added a line for my new "Results_Merch Detail" section.
    var objServDate = ActiveDocument.Sections["Casket Margin"].Shapes["Service_Date^qiqlbx^showname^a"];
    if (objServDate.SelectedList.Count > 2){
         Alert("Please select only two dates");
         return;
    ActiveDocument.Sections.Item(txlMe.Text).Qiq_onControlClick(this.Parent,this)
    ActiveDocument.Sections["Results_Merch Detail"].Limits["Service Date"].Operator = 11
    ActiveDocument.Sections["Results_Detail"].Limits["Service Date"].Operator = 11;
    I tried it with and without an extra semi-colon at the end of my line. Is that the right way to tell it to apply it to more than 1 Result??
    Worked with this for hours now and can't find whatever else is hidden which tells the QIQfIlter Date to refresh this NEW query/result when chosen.
    I tried to make sure all Filter items exist in the new query's Request line, one was missing. i haven't gone back to Dash Studio since then and re-saved, does THAT matter? I saved the .BQY and re-processed, still no luck.
    can anyone help? I'm desperate for suggestions.
    Thank you!
    Karen

    This has been resolved. The main thing that kept it from working was I kept launching the Dashboard Studio after I was in Design mode so any time I got to the QIQ Filters setup screen it looked like cryptic code and there was nothing to alter or play with to try and force the filters to take effect, so I never changed anything.
    This time I launched the Dashboard Studio while accidentally in regular mode, blessing in disguise. on Step 1 of the wizard I chose QIQ Filter Properties from the configuration drop down list which pops up the Local Filters setup window, now in place of code syntax there was english-like words & action items for me to play around with so I chose my new result set from the drop down list and highlighted all the limits and clicked "Set Filters". Presto, that did it.
    Also I had to make sure all the columns referenced in the QIQ drop down lists and pick list was in my request line in the Query & Result section, repeat the above, and it's all working great now.
    Thanks,
    Karen

  • Is it possible to open a query from sap menu favorite to excel?

    Hi all
    I have added a query in favorite . From the favorite in sap menu , i want to open the query in excel.
    Is is possible?
    Currently the query open in web.
    Please revert back if you have any idea
    Thanks
    ajay

    Hi Daya Sagar,
    You said the query saved in favorite from query designer will open in browser and the one saved from analyzer will open in bex excel. But it does not work for me. It saves as web icon and both query is opening in browser.
    Hi All,
    The different story for me is I have problem of opening the web browser by running a query from favorite or user menu because in the url I have different Client. Is there any way to fix this url problem. Any one in this thread can help me on this issue and will be awarded. Thanks.
    Raj

  • Query based Report (Reports From SQL Query)

    Hi All,
    I am facing a problem with a report. I need your help.
    I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
    If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
    Can i increase a timeout of portal page, how i can do this?
    The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
    Please help me to find appropriate reasone for the failure?

    Can you post the URL that is giving you the page not found error ? I am not sure if I can be of much help though.
    In order to increase your chances to get a reply you should also post your question in the Portal Forum - Oracle Application Server Portal
    Edited by: Rodolfo Ferrari on Jun 16, 2009 3:49 PM

  • Adding update and delete buttons to a  Report from SQL Query

    There is an option when creating a QBE to add update and delete
    links which i find quite useful, but this option doesn't seem to
    be possible on a Report from SQL Query. Do i need to do
    something special to add them? is the option located in a
    different place?

    Hi,
    You can only add Update ,Delete in QBE Reports,
    there is no option in Portal which can be used to
    have these buttons in the Reports from Query Wizard or
    Report from SQL Query.
    Thanks
    Vineet

  • Getting zero-sized reply error when running report from SQL query

    Hi,
    I have a Report from SQL Query in Portal. When I select Excel in Output Format and then run the report, it works properly, but when I select HTML in Output Format, the report works if the rows returned are not so many (I've been able to display the report for up to 701 rows), but when I try selecting a value from the LOV that selects many rows, I get the following error:
    ERROR
    The requested URL could not be retrieved
    While trying to retrieve the URL: <data suppressed>
    The following error was encountered:
    Zero Sized Reply
    Squid did not receive any data for this request.
    Any ideas on how to fix this? Why does the number of rows returned affect the report this way?
    Thanks,
    Lorena

    Problem comes when any of the filter is applied in any one of the cases selected from the GUI.Do you mean that the problems only shows when you run the report in your browser via 9iAS?
    Which version are you using?
    Can you post the before report trigger?

Maybe you are looking for

  • Not all fields in Address Book are syncing

    For some reason not all the fields in my address book get synced from one computer to another. The template for all the fields in address book are the same on the different computers but the 'Department' field does not get synced. Any ideas how to fi

  • Error While uninstalling the Oracel 11g

    Hi Guys, I am new to Oracle environment and i tried to install oracle 11g enterprise version on my laptop (64 bit win 7 enterprise verion) for practice and learning purpose. looks like i made something wrong and now i would to uninstall the whole pro

  • IPod is full ! How do I update it?

    Are you clever enough to solve my mystery? iTunes has announced its library is bigger than my iPod's 60GB hard drive. It has helpfully created a 60GB selection of my music (called "MyIpodsName Selection", which it has uploaded to the iPod. Problem is

  • ITunes stops playing for no reason

    Every once in a while, iTunes will randomly stop playing in midsong. I'm usually using a different application (Safari, MS Word, etc) when it happens. When I go back to iTunes the "play" key is on pause, as if I were to have paused the song myself. W

  • Feature request - image lock

    i have asked for such a feature before but after some time... and nothing happens... i will bring this up again. i would like to have a feature in LR that allows me to LOCK finished photos to keep inadvertent changes from going undetected. i would li