Using Query Results in Queries

I understand how to "Using Query Results in Queries" through
this link:
http://www.adobe.com/livedocs/coldfusion/5.0/Developing_ColdFusion_Applications/queryDB11. htm;
However, does anyone know how to do this inside a component?
note: the first query gets parameters through a form and the second
query is called through a grid bind.

I didn't read the link, but there are two ways to use query
results in other queries. At least two that I know about.
One is to use valuelists. Since your link was for Cold Fusion
5, that's probably what they mentioned.
The other is with Query of Queries.
You do it in a component the same way you do it in a
template.

Similar Messages

  • Using Query results

    Hi All,
    Is there any way to use a query result as a dataset for another query.  We do not wnat to do staging and want to handle a complex series of calculation thru the above route.
    Thanks
    Neeraj

    hi neeraj,
    <b>Creating iViews Based on Custom Queries </b>
    http://help.sap.com/saphelp_nw04/helpdata/en/8a/1bd9d01ba3401f9db58ef89566c38c/frameset.htm0
    DataBase :
    http://help.sap.com/saphelp_webas630/helpdata/en/8d/2d5fac955fbb43871e348257f6c49d/content.htm
    Weblogs :
    https://www.sdn.sap.com/irj/sdn/weblogs?
    blog=/pub/wlg/2088
    Hope It Helps
    Thanks
    Varun CN

  • How to use query-result as a new query-fiter

    HI, All
    Is it possible to execute sub-query filtererd by the pre-query-reslted lists ?
    As far as I investigated, only way to do is that I combine two suject-areas by using set operations like "Union" or around.
    But in this way, there is an impractical restriction to define these datatype and column in common. (namely, "Union" conditions)
    I just want to query filtered by ex-query-results at anytime; for example, I extract a customer lists by one query and use various analysis in the group of customer list.
    Please give me some advise.
    Regards

    First create a Request with your FilterQuerey. Secund Create a Request und create a Filter. Under Advanced you will find the path to the first Requst. Than you can select the columns.
    Thats it :-)
    Stefan

  • Use query results in ABAP

    hi,
    does anyone know how i could use the values outputted by a query in ABAP? i haven't seen any way to do this, and help is appreciated. =)
    ryan.

    Hi Ryan,
    I think this is the same as Jkyle wants to do. Please check out his thread.
    How to Extract  Query Result into Internal Table?
    regards
    Siggi

  • Use query results in transformation

    Hello experts,
    is it possible to use the results of a query to load data to a infocube?
    We have an infocube containing detailed data. On this cube a query is built with a lot of calculated key figures. Now we would like to load these calculated key figures to a more aggregated cube.
    Thanks in advance,
    Ralph
    points will be awarded

    I would look at the APD process that Edwin mentions.  Typically, the way it would work is you use your query as input, writing the results to a DSO, then datamart the results form there to the cube.
    APD could also be used to directly update a Mstr Data infoobject if that made more sense, then datamart that to he cube.
    I'm not familiar with the CRM / falt file approach mentioned.  Might be fine for what you want to do.  The APD process has more options to perform additional manipulation of the data and even joining it with other query results if you wanted, plus the results end up in a DSO that I think might provide more options for retaining and managing the query results.
    You can review the online help for APD, also SAP's Data Mining class BW380 (might have a new name for BI 7.0) covers this area.

  • Use Query Results as XML?

    Hey all, I searched the forums but didn't find anything that
    quite fit this particular issue, I'm hoping someone can help me
    out.
    I am storing a string of text in a database field. It's an
    XML string (not technically, but it's formatted to BE xml).
    I am pulling this from the database in ColdFusion and trying
    to use it as XML, but having no luck. I can get as far as pulling
    it and dumping the data and I get this:
    <root><Booleanval>on</Booleanval><SuperDooperSelector>1</SuperDooperSelector><ContentBody> words</ContentBody><ContentTitle>AWESOME</ContentTitle><DocumentName>Content
    1</DocumentName></root>
    It's a test so the values are a bit goofy but it appears as
    it should nonetheless. I am wondering if there is a way I can parse
    this into actual XML and access these attributes the same way I
    normally would in ColdFusion. It won't let me use XMLParse(#myvar#)
    because it is technically a query.
    Does anyone know how I can use this data as XML in
    ColdFusion?

    "TomNez" <[email protected]> wrote in
    message news:gpu7r7$h18$[email protected]..
    > Hey all, I searched the forums but didn't find anything
    that quite fit this
    > particular issue, I'm hoping someone can help me out.
    >
    > I am storing a string of text in a database field. It's
    an XML string (not
    > technically, but it's formatted to BE xml).
    >
    > I am pulling this from the database in ColdFusion and
    trying to use it as XML,
    > but having no luck. I can get as far as pulling it and
    dumping the data and I
    > get this:
    >
    >
    >
    <root><Booleanval>on</Booleanval><SuperDooperSelector>1</SuperDooperSelector><Co
    >
    ntentBody>words</ContentBody><ContentTitle>AWESOME</ContentTitle><DocumentName>C
    > ontent 1</DocumentName></root>
    >
    > It's a test so the values are a bit goofy but it appears
    as it should
    > nonetheless. I am wondering if there is a way I can
    parse this into actual XML
    > and access these attributes the same way I normally
    would in ColdFusion. It
    > won't let me use XMLParse(#myvar#) because it is
    technically a query.
    >
    > Does anyone know how I can use this data as XML in
    ColdFusion?
    >
    See if this helps:
    http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html
    Ken Ford
    Adobe Community Expert - Dreamweaver/ColdFusion
    Adobe Certified Expert - Dreamweaver CS3
    Adobe Certified Expert - ColdFusion 8
    Fordwebs, LLC
    http://www.fordwebs.com
    http://www.cfnoob.com

  • Use Query Results in Subsequent Query

    Is it possible to use a value returned in query number one in
    query number two as the "where"? For example, Box Number is
    returned in query number one, and I want to query again for
    additional information based upon the box number.

    Lucky Kitty wrote:
    > Is it possible to use a value returned in query number
    one in query number two
    > as the "where"? For example, Box Number is returned in
    query number one, and
    > I want to query again for additional information based
    upon the box number.
    >
    Yeah, it is just a variable and can be used as anyplace
    another variable
    can be used.
    But when one is doing this kind of thing at least 8 out of 10
    times, it
    can be done with a single query with a proper join.

  • How to use SQL query result in DOS commands

    Hi
    Currently i am runnig below DOS commands manually
    d:\apps\bin>TrueGridsCalc period="Aug 2010"
    Now I want to write one batch file and schedule job on windows and make value of "period" to be dynamic. So to get that value i need to fetch it from DB
    Steps which i am taking are
    1. connect DB from command line (using SQLPLUS)
    2. run query to fetch result
    3.How to use query result in "period" parameter ?
    I am good at step 1 and 2. Dnt know how to use query result in command to make it dynamic
    Thank you
    Sachin
    Edited by: sachin.mali on Oct 26, 2010 4:39 PM
    Edited by: sachin.mali on Oct 26, 2010 4:43 PM

    sachin.mali wrote:
    Hi
    Currently i am runnig below DOS commands manually
    d:\apps\bin>TrueGridsCalc period="Aug 2010"
    Now I want to write one batch file and schedule job on windows and make value of "period" to be dynamic. So to get that value i need to fetch it from DB
    Steps which i am taking are
    1. connect DB from command line (using SQLPLUS)
    2. run query to fetch result
    3.How to use query result in "period" parameter ?
    I am good at step 1 and 2. Dnt know how to use query result in command to make it dynamic
    Thank you
    Sachin
    Edited by: sachin.mali on Oct 26, 2010 4:39 PM
    Edited by: sachin.mali on Oct 26, 2010 4:43 PMYOu'll have to have sqlplus spool the output to a file, then figure out some way of parsing that file. Too bad you're stuck with Windows. With any *nix you could do the file parsing with one line of code.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Sending email using PL/SQL based on a query result

    Hello all,
    I want to create a procedure using PL/SQL, based on a query result.Here is the scenario:
    I have multiple tables in Target and Source databases that I want to compare(not the whole table but queries on these tables) and if they differ, I want to shoot an email. I have some ideas how to implement this but not sure whether it is the best approach.
    select Acct_id, total from SourceTableA
    minus
    select Acct_id, total from TargetTableA
    select Acct_id, sum from SourceTableB
    minus
    select Acct_id, sum from TargetTableB
    If the result of any of above queries > 0 then I want to shoot an email and want to repeat this procedure in the morning every day.
    I know how to implement send_mail procedure using UTL_SMTP package and how to schedule tha job by dbms_job package. But I am not sure how to implement the result of minus query. In case if minus > 0 then I also want to send the name of tables in the email message where source and target tables are not same. Should i use cursor, variable or insert the result in a new table? any help would be highly appreciated. Thanks in advance.
    Khan

    Actually these queries are the part of our daily testing that we run everyday manually(after the scheduled ETL load) to see if there are any discrepencies between our datawarehouse tables and source tables. So instead of running these queries manually everyday we want to schedula a procedure that will shoot an email in case of any discrepency and indicate which tables have problems.

  • Use APD to get Rank from TopN query result to target for Universe

    Hello,
    I am trying to take a query result set where I am calculating a key figure as Rank and run it through an APD to write to a DSO.
    This is a top 5 query for a dashboard.  I keep getting an MDX failure on the query.
    Any ideas? 
    My ultimate goal is to set up a process to take TopN query results and get them into a target that can be used in a Universe.
    Thanks,
    Chris

    Hello Chris,
    I recommend to post this query to the [Universe Designer and Business Views Designer|Semantic Layer; forum.
    This forum is dedicated to topics related to the universes and business views.
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all Enterprise Information Management queries remain in one place and thus can be easily searched in one place.
    Thanks a lot,
    Falk

  • Using the client result cache without the query result cache

    I have constructed a client in C# using ODP.NET to connect to an Oracle database and want to perform client result caching for some of my queries.
    This is done using a result_cache hint in the query.
    select /*+ result_cache */ * from table
    As far as I can tell query result caching on the server is done using the same hint, so I was wondering if there was any way to differentiate between the two? I want the query results to be cached on the client, but not on the server.
    The only way I have found to do this is to disable all caching on the server, but I don't want to do this as I want to use the server cache for PL/SQL function results.
    Thanks.

    e3a934c9-c4c2-4c80-b032-d61d415efd4f wrote:
    I have constructed a client in C# using ODP.NET to connect to an Oracle database and want to perform client result caching for some of my queries.
    This is done using a result_cache hint in the query.
    select /*+ result_cache */ * from table 
    As far as I can tell query result caching on the server is done using the same hint, so I was wondering if there was any way to differentiate between the two? I want the query results to be cached on the client, but not on the server.
    The only way I have found to do this is to disable all caching on the server, but I don't want to do this as I want to use the server cache for PL/SQL function results.
    Thanks.
    You haven't provided ANY information about how you configured the result cache. Different parameters are used for configuring the client versus the server result cache so you need to post what, if anything, you configured.
    Post the code you executed when you set the 'client_result_cache_lag' and 'client_result_cache_size' parameters so we can see what values you used. Also post the results of querying those parameters after you set them that show that they really are set.
    You also need to post your app code that shows that you are using the OCI statements are used when you want to use client side result cacheing.
    See the OCI dev guide
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28395/oci10new.htm#sthref1491
    Statement Caching in OCI
    Statement caching refers to the feature that provides and manages a cache of statements for each session. In the server, it means that cursors are ready to be used without the need to parse the statement again. Statement caching can be used with connection pooling and with session pooling, and will improve performance and scalability. It can be used without session pooling as well. The OCI calls that implement statement caching are:
      OCIStmtPrepare2()
      OCIStmtRelease()

  • Retrieving BEx Query Results Area for use in Excel formulas

    Hello,
    I run BEx queries in workbooks and then use Excel formulas ( mostly VLOOKUP(LookupValue, ResultsArea, ColumnReturned,) ) to retrieve certain information from the query ResultsArea.
    ****Problem:
    Depending on the query parameters, the query "Results Area" is larger or smaller.
    ****Non-optimal solution:
    One way to define the  ever changing Excel range occupied by the Results Area is to create an Excel name as:
    QueryRange = OFFSET(QueryFirstCell,,,COUNTA(OFFSET(Sheet1!$A:$A,,COLUMN(QueryFirstCell)-1,,)),COUNTA(OFFSET(Sheet1!$1:$1,ROW(QueryFirstCell)-1,,,)))
    Then, the only input required is the top-left cell of the Results Area, which stays the same (unless the query definition changes).
    ****Question
    What is the best way to refer to an ever-changing query Results Area in an Excel formula?
    Thank you!
    Louis

    It is actually much easier than that.
    Use a VBA statement like the following:
    Set RptRng = ActiveCell.CurrentRegion
    This will retrieve the data in the Results Area, no matter what the size is.
    Hope this helps...
    Bob

  • Ps query results to xml using xml link function registry

    In People tools version 8.46 we need something like where the ps query result output is in the form of XML so that it can be used for external system. The catch I cannot use webservices. It is something like opening peoplesoft queires form excel using hyperlink but in this case we need xml. I looked at David Vandiver's Excel XML libraries which open the data in excel but is there something where the hyperlink output is xml using xml link function registry. I have capatured the data in rowset and now need to create mime type of xml to write the data
    thanks in advance
    vinn

    If I understand correctly, you want to use something like Microsoft Excel's web queries to get data from a PeopleSoft query in XML format. I have never done this before, but if I were to implement this, here is what I would do in PT 8.46:
    1. Create an unstructured message in app designer.
    2. Create a user that only has access to the queries you want to expose to Excel
    3. Write synchronous message handler PeopleCode to call SwitchUser to switch to a specific query user rather than the generic integration broker user and execute a query, returning the results in XML (see [Query.RunToRowsest|http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tpcr/htm/tpcr31.htm#d0e113933] for an example).
    4. Call the message through IB using the HTTP GET URL format as defined in PeopleBooks: [http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tibr/book.htm?File=tibr/htm/tibr33.htm#H4026|http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tibr/book.htm?File=tibr/htm/tibr33.htm#H4026].

  • How to use one query results in another query

    hi,
    in help.sap I have founded that using variable type replacement path I can use one query results in another query. It is wrote there that I have to choose query name results I want to get in variable definition but I do not know where.
    How I can do this?
    Result I want to get is:
    In one query I have material prices in another material quantities. I want to calculate inventory value (price * quantity). Moreover prices are on plant level, quantities on storage type level. Plant is atribute of storage type.
    Can I do this?
    Regards,
    Andrzej

    Hi Andrzej,
    please check out this thread: Set parameters values depending on other parameters
    I had a discussion about query results as input for another query in there.
    For creating a workbook, just click on the save button after you ran your query in the bex.
    Siggi
    Message was edited by: Siegfried Szameitat

  • Using previous results in a query

    Hi
    Please can someone assist.
    I have a bex query - 1 structure only in my columns
    I have my data in rows broken down by calendar year.
    What I need to be able to do is to use the result in calendar year 2008 and sum it in calendar year 2009.
      Calendar month
      Calendar Year
      Remaiining
      Date of Hire
      Quota number
      Carry Over
      Deduction
    MAY
    2009
    21.960
    2000/05/15
    21.960
    0.000
    21.960
    2010
    30.000
    2000/05/15
    30.000
    0.000
    30.000
    2011
    42.260
    2000/05/15
    42.260
    0.000
    42.260
    2012
    39.240
    2000/05/15
    33.240
    6.000
    27.240
    2013
    50.000
    2000/05/15
    25.000
    25.000
    0.000
    JUL
    2008
    39.780
    2000/05/15
    39.780
    0.000
    39.780
    DEC
    2007
    43.700
    2000/05/15
    43.700
    0.000
    43.700
    Result
    266.940
    2000/05/15
    235.940
    31.000
    204.940
    My last column needs to be Entitlement which should be the carry over of 2012 + carry over of 2013 = 31 - which should be my entitlement for 2013.
    Not sure if that makes any sense.
    Please see images attached.
    Is there a way to do this with no ABAP, as I am not able to write the customer exit.
    Thank you

    You may try with Cell definitions concept by introducing a "Calyear structure" in rows and define 2013 cell accordingly. Rest all cells other than in Entitle ment KF take the definitions of their respective CKFs/RKFs. Leave all cells blank other than 2013 in Entitlement KF.
    Remove Calyear infoobject which is there currently in rows pane and then create a structure in place of it. Every year, you will need to enhance the Calyear structure and make the cell definitions accordingly as per your business requirement.
    Please have a look at my blog to get a brief idea on what I am saying.
    How to achieve Slab Wise or Bucket Wise and Age Wise requirements in BEx
    Message was edited by: SumaN ChakravarthY K
    Message was edited by: SumaN ChakravarthY K

Maybe you are looking for