Multiple queries with 1 connection

Can I execute multiple queries with one connection?
//Example -
<%
String firstconn;
Class.forName("org.gjt.mm.mysql.Driver");
// create connection string
firstconn = "jdbc:mysql://localhost/profile?user=mark&password=mstringham";
// pass database parameters to JDBC driver
Connection aConn = DriverManager.getConnection(firstconn);
// query statement
Statement firstSQLStatement = aConn.createStatement();
String firstquery = "UPDATE auth_users SET last_log='" + rightnow + "'WHERE name='" + username + "' ";
// get result code
int firstSQLStatus = firstSQLStatement.executeUpdate(firstquery);
// close connection
firstSQLStatement.close();
%>     
Now, instead of building a new connection for each query, can I use the same connection info for another query?
if so - how do you do this?
thanks for any help.
Mark

Create multiple statement objects from your connection. It's a good idea to close these in a finally block after you're done with them
Connection conn = null;
Statement stmt1 = null;
Statement stmt2 = null;
try {
    conn = DriverManager.getConnection();
    stmt1 = conn.createStatement();
    // some sql here
    stmt2 = conn.createStatement();
    // some more sql here
} finally {
    if ( stmt1 != null ) stmt1.close();
    if ( stmt2 != null ) stmt2.close();

Similar Messages

  • Multiple Queries with JDBC

    Hello. I'm somewhat new to all of this, so forgive me if this is something really basic.
    I'm developing an application which must interact with my MySQL database pretty frequently, however it seems to me that I am unable to, essentially, have multiple ResultSets open at a given time, which as a result prevents me from making multiple queries simultaneously. The essential problem is...
    ResultSet rs = statement.execute( "SELECT * FROM table");
    if (rs.next())
        ResultSet srs = statement.execute( "SELECT * FROM table2");
        rs.getInt("id");
    }...Yields a NullPointerException on line 5. If I am correct in my understanding, this is due to a ResultSet closing when it's statement is used a second time.
    My best guess to solving this problem is to create a pool of statement objects (which would essentially be a number of connections to the DB), and then use the first open statement object (or a newly created one) to run a particular query... however this seems rather sloppy. Not to mention that, offhand, I'm not even sure if I can have multiple connections open to the DB at the same time. Is there any better way to run multiple queries at the same time with JDBC?
    Thanks in advance for any help.
    -Jess

    That's actually what I thought at first as well... given that a NPE is generally thrown along the lines of null.getMethod() however there is no null anywhere in my code, only a closed ResultSet... which returns an NPE on using a get method. For example:
    //our import
    import java.util.*;
    import java.sql.*;
    import javax.swing.JComponent.*;
    public class Server
            public static void main( String args[] ) throws Exception
                    try
                            //register driver
                            Class.forName("com.mysql.jdbc.Driver");
                            //location of database (including string to register unicode as utf-8
                            String dbUrl = "jdbc:mysql://localhost:1111/db_name?requireSSL=false&useUnicode=true&characterEncoding=UTF-8";
                            //create connection object
                            Connection mysqlConnection = DriverManager.getConnection(dbUrl,"username","password");
                            //autocommit
                            mysqlConnection.setAutoCommit(true);
                            //log information
                            System.out.println("Connected. Connection=" + mysqlConnection);
                            Statement mysqlStatement = mysqlConnection.createStatement();
                            mysqlStatement.execute("SELECT * FROM mud_index_players");
                            ResultSet rs = mysqlStatement.getResultSet();
                            if (rs.next())
                                    System.out.prinlnt("getInt() is " + rs.getInt("id"));
                                    mysqlStatement.execute("SELECT * FROM mud_table_stats");
                                    ResultSet rs2 = mysqlStatement.getResultSet();
                                    System.out.println("Now it's " + rs.getInt("id"));
                    catch ( ClassNotFoundException cnfe )
                            cnfe.printStackTrace();
                    catch ( Exception e )
                            e.printStackTrace();
    }Yields:
    Connected. Connection=com.mysql.jdbc.Connection@329f3d
    getInt() is 1
    java.lang.NullPointerException
            at com.mysql.jdbc.ResultSet.buildIndexMapping(ResultSet.java:575)
            at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:930)
            at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:2507)
            at Server.main(Server.java:34)Where line 34 in Server.main is System.out.println("Now it's " + rs.getInt("id"));Thanks again for all your help!
    -Jess
    Message was edited by:
    [email protected]
    (Was missing some code tags)

  • Multiple Queries with Multiple Prompts

    Hi,
    I created a WEBI that consist of two queries. Both query is the same except the currency value in the prompt.
    Query 1: Currency is MYR
    Query 2: Currency is USD.
    I have both Query1.NetSales and Query2.Netsales in the same report. I am able to get the report to show correct figure by running the query one by one and fill in the currency separately.
    But when I run all queries or refresh all data, it only show one prompt and both queries will run based on the currency in the prompt (either MYR or USD). In the infoview, I can only able to fill in values for one prompt.
    Anyone could please advise how can the report handle multiple prompts?

    Thanks, but my report still doesn't show the correct figure.
    My Universe is generated by the SAP BW query. The prompt is auto generated base on the condition filter in the universe which is including the currency and country.
    I had added the currency in the query filter for both query:
    Query1:  LovCurrency: Prompt "MY Currency:"
    Query2: LovCurrency: Prompt "US Currency:"
    when I run all the queries, I am able to see the above 2 newly created filter in the prompt. I had filled in MY Currency with "MYR" and US Currency with "USD". and I select Malaysia as country.
    Both Query1.NetSales and Query2.NetSales in the report appear the same value and it's in MYR currency. The figure is automatically calculate base on the country default currency. If I choose multiple countries in the prompt, I will get unknown number.
    My question is that, why is my currency in query filter does not take effect and overwrite the default currency.

  • Dropdown Box Effecting Multiple Queries with Different Technical ID InfoObj

    Hi,
    I'm using BW 3.5 Web Application Designer.  I have a dropdown box for region (0REGION) based on DataProvider1 and it effects DataProvider1, DataProvider2, and DataProvider3.  In DataProvider2, the query that is used has region as a navigational attribute of Plant, ie 0PLANT__0REGION.  And in DataProvider3, the query is based on an InfoSet.  So the region field is named like ZABC_I01__F02.
    My issue is that DataProvider2 and DataProvider3 don't get updated when I select a region from the dropdown.  Essentially, all three (0REGION, 0PLANT__0REGION, and ZABC_I01__F02) are region except that the technical names are different.  Has anyone also experienced this?  And is there a solution>
    Thanks!

    You will have to use Custom JavaScript + BW Web API commands to generate the filter URL for all the different data providers.
    There is a how to document available for generating URLs based on dropdown selection under the BI How to guides.

  • Variable Sequence when using multiple queries

    Hi Experts,
    how can I adjust the variable sequence of a workbook that uses multiple queries (with variables of which each exists in at least two included queries)?
    E.g.:
    DP1 with variable sequence "A, B, D"
    DP_2 with variable sequence "A, C, D"
    DP_3 with variable sequence "B, C"
    I want "A, B, C, D" as the sequence for the workbook but i did not figure out how to adjust this.
    I already tried to insert a dummy DataProvider that holds all variables in the right sequence.. No success..
    Any help very appreciated!
    Marco

    Hi Mayank,
    thanks for your answer.
    I wonder how the displayed sequence of the common variables is derived from the underlying queries. Perhaps one can change the sequence of the variables by inserting the DataProviders in another sequence?!
    Regards,
    Marco

  • Poor Performance 7.0 Workbook with multiple queries

    Hi all,
    I've got the following issue. Our users have workbooks which contain serveral queries on different sheets. (One on each workbook sheet)
    When a workbook contains 5 or more queries, the overall workbook performance will decrease drastically. Workbook with 8 or more queries result in time-outs and messages like unsufficient shared memory.
    Does anyone have the same kind of problems with multiple queries in a Bex 7.0 workbook? Do any one have a solution?
    Any suggestions are welcome.
    Thanks!
    Cheers,
    Ron

    Bill,
    Tried to make a workbook according to your advise. It certainly makes a difference in workbook size. The new workbook is 50% smaller than the older version based on the standard SAP template.
    However, my workbook contains 17 queries, and after 5 minutes it breaks the BW connection. So basic conclusion is that BW 7.0 workbook can't work with a large number of dataproviders/ queries.  This did work in BEx BW 3.x.
    If any one has any other suggestion, more than welcome.
    Cheers,
    Ron

  • Single report with multiple queries OR multiple reports with single query

    Hello Experts,
    I have a confusion regarding Live Office connection for many days. I asked many people but did not get a concrete answer. I am re-posting this question here and expecting an answer this time.
    The product versions that I am using are as follows:
    FrontEnd:
      BOE XI 3.1 SP4 FP 4.1
      Xcelsius Enterprise 2008 SP4
    Backend:
      SAP BW 7.0 EHP1
    I have created a dashboard which is getting data from a webi report using LO connections.
    The webi report has five report parts which are populated by five different queries.
    Now my question is, when the five LO connections are refreshed, is the webi report refreshed five times or just once?
    If the report is refreshed five times, then I guess it is better to have five different webi reports containing single report part, because in that way we can prevent same query being executed multiple times.
    SO what is the best practice- to have a single report having multiple queries - OR - to create multiple webi reports with single query?
    Thanks and Regards,
    PASG

    HI
    I think Best Practice is Multiple reports with single query
    Any way If LO connections refresh 5 time the query will refresh 5 timesRegards
    Venkat

  • Creating report with multiple queries in clear quest

    Hi,
    I am new to reports and currently working with creating reports that connect to clear quest(CQ).
    I have successfully created several reports, that connect to the CQ, but they all have data from only one query.
    Now I am trying to create a slightly complex report where I need to fetch data from multiple queries. All these queries use 2 parameter to filter their data. I have dynamic cascading parameters to get them. When just connecting they all work ok. I used the link tab to link them to two fields of one query, to make sure that they all filter to fields from same query.
    The problem is when I drop the fields from the various queries on the form, the data is fetched multiple times.
    I also played with links to make them outer links but in that case I get error and unable to run the report completely.
    Any ideas on how to work with multiple queries and provide same parameters to all of the queries?
    Thanks in advance.
    -PAP

    - How do I make sure that the relationship is not one to many?
    You don't. That's the nature of the data. For example a single person can order multiple items. A simple one to many relationship.
    - In the link tab, I can only point to queries, is there a way I can point the fields to report params?
    You should be seeing tables... I think you're having a tough time with the basic terminology.
    - How does these Enforce Joins (4 options) work.
    There is rarely if ever any reason to switch from the default "not enforced". Leave it alone. The only one you'll touch 90% of the time is the Join Type.
    PAP,
    Based on the questions you're asking, it sounds like you are missing some major database fundamentals. My suggestion would be to step away from CR for the time being and read a little bit about relational databases (what makes them relational) and database normalization. This will also give you an idea about the various join types and when to use one over the other.
    You can know every feature and function in CR, but until you have at least a basic knowledge of how data relates, you'll never pull in the data you need.
    Jason

  • Multiple queries in reports with XSL-FO and without BI Publisher

    Hello,
    I'm trying to find out how to create a complex report in APEX for printing. The report contains multiple queries in different layout, images and static text.
    I don't have the possibility to use BI Publisher and I'm not an XSL-FO expert. However I'm trying to find out if it's possible at all not using BI Publisher.
    I'm having the impression that multiple report queries and layouts in APEX can only be used in combination with BI Publisher. I'd be glad if someone could give me an example of how to do multiple queries and layout in a single report only using XSL-FO.
    Thanks in advance,
    Jan Willem

    Hello,
    I'm trying to find out how to create a complex report in APEX for printing. The report contains multiple queries in different layout, images and static text.
    I don't have the possibility to use BI Publisher and I'm not an XSL-FO expert. However I'm trying to find out if it's possible at all not using BI Publisher.
    I'm having the impression that multiple report queries and layouts in APEX can only be used in combination with BI Publisher. I'd be glad if someone could give me an example of how to do multiple queries and layout in a single report only using XSL-FO.
    Thanks in advance,
    Jan Willem

  • Bursting a report with multiple queries

    Hi,
    I need to set-up bursting in BIP for a report with multiple queries. The output format is pdf and delivery is through e-mail. Since the queries need to be linked, I'm trying to do this using data template. I've set-up split and burst based on a field (store_id) from the first query which is used as a bind variable in the subsequent queries. So I'd ideally want the report to be split based on store_id. The report works fine if I use a parameter for store_id and view the output by store_id. When I try to schedule the report for bursting, it generates and e-mails the reports but only the last report appears to have correct data output while the others have only the output from the first query (and all other queries appear to return nothing in the report).
    Any suggestions on what could be the issue here? Thanks!
    Here is the data template for the report:
    <dataTemplate name="Report" description="Report" dataSourceRef="ReportDB">
    <dataQuery>
    <sqlStatement name="STORE_VENDOR">
    <![CDATA[SELECT STORE.STORE_ID Q1_STORE_ID, VENDOR.VENDOR_ID Q1_VENDOR_ID, VENDOR.VENDOR_DESC Q1_VENDOR_DESC, PERSON.NAME Q1_NAME
                   FROM STORE, SERVICE_TICKET, VENDOR, ROLE, ROLE_TYPE, PERSON, PERIOD PERIOD_FROM, PERIOD PERIOD_TO
                   WHERE (SERVICE_TICKET.SOURCE_ID = STORE.SOURCE_ID AND SERVICE_TICKET.STORE_ID = STORE.STORE_ID)
                   AND (SERVICE_TICKET.SOURCE_ID = VENDOR.SOURCE_ID AND SERVICE_TICKET.VENDOR_ID = VENDOR.VENDOR_ID)
                   AND (STORE.SOURCE_ID = ROLE.SOURCE_ID AND STORE.STORE_ID = ROLE.STORE_ID)
                   AND (ROLE.SOURCE_ID = ROLE_TYPE.SOURCE_ID AND ROLE.ROLE_TYPE_ID = ROLE_TYPE.TYPE_ID AND ROLE_TYPE.TYPE_DESC = 'PIC')
                   AND (ROLE.SOURCE_ID = PERSON.SOURCE_ID AND ROLE.PERSON_ID = PERSON.PERSON_ID)
                   AND SERVICE_TICKET.START_DATE BETWEEN PERIOD_FROM.START_DATE AND PERIOD_TO.END_DATE
                   AND PERIOD_FROM.PERIOD_DESC = 'Cal Week 1'
                   AND PERIOD_TO.PERIOD_DESC = 'Cal Week 4'
                   GROUP BY STORE.STORE_ID, VENDOR.VENDOR_ID, VENDOR.VENDOR_DESC, PERSON.NAME
                   ORDER BY STORE.STORE_ID]]>
    </sqlStatement>
    <sqlStatement name="WO">
    <![CDATA[SELECT STORE.STORE_ID Q3_STORE_ID, 'Nightly Cleaning' Q3_NIGHTLY_CLEANING, 'Nightly Cleaning' Q3_DESCRIPTION, SERVICE_TICKET.TICKET_ID Q3_TICKET_ID, TO_CHAR(SERVICE_TICKET.END_DATE, 'MM/DD/YYYY') Q3_END_DATE, 'Excellent' Q3_QUALITY_RATING_1, 'Satisfactory' Q3_QUALITY_RATING_2, 'Unsatisfactory' Q3_QUALITY_RATING_3
                   FROM SERVICE_TICKET, STORE, PERIOD PERIOD_FROM, PERIOD PERIOD_TO
                   WHERE (SERVICE_TICKET.SOURCE_ID = STORE.SOURCE_ID AND SERVICE_TICKET.STORE_ID = STORE.STORE_ID)
                   AND SERVICE_TICKET.START_DATE BETWEEN PERIOD_FROM.START_DATE AND PERIOD_TO.END_DATE
                   AND STORE.STORE_ID = :Q1_STORE_ID
                   AND PERIOD_FROM.PERIOD_DESC = 'Cal Week 1'
                   AND PERIOD_TO.PERIOD_DESC = 'Cal Week 4']]>
    </sqlStatement>
    <sqlStatement name="SERVC_TYPE_1">
    <![CDATA[SELECT STORE.STORE_ID Q4_STORE_ID, ZONE.ZONE_DESC Q4_ZONE_DESC, SERVICE_TICKET_LINE.SERVICE_COST Q4_SERVICE_COST, SERVICE_TICKET_LINE.TICKET_ID Q4_TICKET_ID, TO_CHAR(SERVICE_TICKET_LINE.WO_END_DATE, 'MM/DD/YYYY') Q4_WO_END_DATE, 'Excellent' Q4_QUALITY_RATING_1, 'Satisfactory' Q4_QUALITY_RATING_2, 'Unsatisfactory' Q4_QUALITY_RATING_3
                   FROM SERVICE_TICKET_LINE, SERVICE_TICKET, STORE, SERVICE_TYPE, ZONE, PERIOD PERIOD_FROM, PERIOD PERIOD_TO
                   WHERE (SERVICE_TICKET.SOURCE_ID = SERVICE_TICKET_LINE.SOURCE_ID AND SERVICE_TICKET.TICKET_ID = SERVICE_TICKET_LINE.TICKET_ID)
                   AND (SERVICE_TICKET.SOURCE_ID = STORE.SOURCE_ID AND SERVICE_TICKET.STORE_ID = STORE.STORE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = SERVICE_TYPE.SOURCE_ID AND SERVICE_TICKET_LINE.SERVICE_TYPE_ID = SERVICE_TYPE.TYPE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = ZONE.SOURCE_ID AND SERVICE_TICKET_LINE.ZONE_ID = ZONE.ZONE_ID)
                   AND SERVICE_TYPE.TYPE_DESC = 'ABC'
                   AND SERVICE_TICKET.START_DATE BETWEEN PERIOD_FROM.START_DATE AND PERIOD_TO.END_DATE
                   AND STORE.STORE_ID = :Q1_STORE_ID
                   AND PERIOD_FROM.PERIOD_DESC = 'Cal Week 1'
                   AND PERIOD_TO.PERIOD_DESC = 'Cal Week 4'
                   ORDER BY SERVICE_TICKET_LINE.SOURCE_ID, SERVICE_TICKET_LINE.TICKET_ID, SERVICE_TICKET_LINE.LINE_ID]]>
    </sqlStatement>
    <sqlStatement name="SERVC_TYPE_2">
    <![CDATA[SELECT STORE.STORE_ID Q5_STORE_ID, ZONE.ZONE_DESC Q5_ZONE_DESC, SERVICE_TICKET_LINE.SERVICE_COST Q5_SERVICE_COST, SERVICE_TICKET_LINE.TICKET_ID Q5_TICKET_ID, TO_CHAR(SERVICE_TICKET_LINE.WO_END_DATE, 'MM/DD/YYYY') Q5_WO_END_DATE, 'Excellent' Q5_QUALITY_RATING_1, 'Satisfactory' Q5_QUALITY_RATING_2, 'Unsatisfactory' Q5_QUALITY_RATING_3
                   FROM SERVICE_TICKET_LINE, SERVICE_TICKET, STORE, SERVICE_TYPE, ZONE, PERIOD PERIOD_FROM, PERIOD PERIOD_TO
                   WHERE (SERVICE_TICKET.SOURCE_ID = SERVICE_TICKET_LINE.SOURCE_ID AND SERVICE_TICKET.TICKET_ID = SERVICE_TICKET_LINE.TICKET_ID)
                   AND (SERVICE_TICKET.SOURCE_ID = STORE.SOURCE_ID AND SERVICE_TICKET.STORE_ID = STORE.STORE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = SERVICE_TYPE.SOURCE_ID AND SERVICE_TICKET_LINE.SERVICE_TYPE_ID = SERVICE_TYPE.TYPE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = ZONE.SOURCE_ID AND SERVICE_TICKET_LINE.ZONE_ID = ZONE.ZONE_ID)
                   AND SERVICE_TYPE.TYPE_DESC = 'XYZ'
                   AND SERVICE_TICKET.START_DATE BETWEEN PERIOD_FROM.START_DATE AND PERIOD_TO.END_DATE
                   AND STORE.STORE_ID = :Q1_STORE_ID
                   AND PERIOD_FROM.PERIOD_DESC = 'Cal Week 1'
                   AND PERIOD_TO.PERIOD_DESC = 'Cal Week 4'
                   ORDER BY SERVICE_TICKET_LINE.SOURCE_ID, SERVICE_TICKET_LINE.TICKET_ID, SERVICE_TICKET_LINE.LINE_ID]]>
    </sqlStatement>
    <sqlStatement name="SERVC_TYPE_3">
    <![CDATA[SELECT STORE.STORE_ID Q6_STORE_ID, ZONE.ZONE_DESC Q6_ZONE_DESC, 'Excellent' Q6_QUALITY_RATING_1, 'Satisfactory' Q6_QUALITY_RATING_2, 'Unsatisfactory' Q6_QUALITY_RATING_3, 'One' Q6_QTY_MISSING_1, 'Two' Q6_QTY_MISSING_2, '3 or More' Q6_QTY_MISSING_3
                   FROM SERVICE_TICKET_LINE, SERVICE_TICKET, STORE, SERVICE_TYPE, ZONE, PERIOD PERIOD_FROM, PERIOD PERIOD_TO
                   WHERE (SERVICE_TICKET.SOURCE_ID = SERVICE_TICKET_LINE.SOURCE_ID AND SERVICE_TICKET.TICKET_ID = SERVICE_TICKET_LINE.TICKET_ID)
                   AND (SERVICE_TICKET.SOURCE_ID = STORE.SOURCE_ID AND SERVICE_TICKET.STORE_ID = STORE.STORE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = SERVICE_TYPE.SOURCE_ID AND SERVICE_TICKET_LINE.SERVICE_TYPE_ID = SERVICE_TYPE.TYPE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = ZONE.SOURCE_ID AND SERVICE_TICKET_LINE.ZONE_ID = ZONE.ZONE_ID)
                   AND SERVICE_TYPE.TYPE_DESC = 'PQR'
                   AND SERVICE_TICKET.START_DATE BETWEEN PERIOD_FROM.START_DATE AND PERIOD_TO.END_DATE
                   AND STORE.STORE_ID = :Q1_STORE_ID
                   AND PERIOD_FROM.PERIOD_DESC = 'Cal Week 1'
                   AND PERIOD_TO.PERIOD_DESC = 'Cal Week 4'
                   ORDER BY SERVICE_TYPE.TYPE_ID]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
         <group name="G_STORE_VENDOR" source="STORE_VENDOR">
              <element name="Q1_STORE_ID" value="Q1_STORE_ID"/>
              <element name="Q1_VENDOR_ID" value="Q1_VENDOR_ID"/>
              <element name="Q1_VENDOR_DESC" value="Q1_VENDOR_DESC"/>
              <element name="Q1_NAME" value="Q1_NAME"/>
         </group>     
         <group name="G_WO" source="WO">
              <element name="Q3_NIGHTLY_CLEANING" value="Q3_NIGHTLY_CLEANING"/>
              <element name="Q3_DESCRIPTION" value="Q3_DESCRIPTION"/>
              <element name="Q3_TICKET_ID" value="Q3_TICKET_ID"/>
              <element name="Q3_END_DATE" value="Q3_END_DATE"/>
              <element name="Q3_QUALITY_RATING_1" value="Q3_QUALITY_RATING_1"/>
              <element name="Q3_QUALITY_RATING_2" value="Q3_QUALITY_RATING_2"/>
              <element name="Q3_QUALITY_RATING_3" value="Q3_QUALITY_RATING_3"/>
         </group>     
         <group name="G_SERVC_TYPE_1" source="SERVC_TYPE_1">
              <element name="Q4_ZONE_DESC" value="Q4_ZONE_DESC"/>
              <element name="Q4_SERVICE_COST" value="Q4_SERVICE_COST"/>
              <element name="Q4_TICKET_ID" value="Q4_TICKET_ID"/>
              <element name="Q4_WO_END_DATE" value="Q4_WO_END_DATE"/>
              <element name="Q4_QUALITY_RATING_1" value="Q4_QUALITY_RATING_1"/>
              <element name="Q4_QUALITY_RATING_2" value="Q4_QUALITY_RATING_2"/>
              <element name="Q4_QUALITY_RATING_3" value="Q4_QUALITY_RATING_3"/>
         </group>     
         <group name="G_SERVC_TYPE_2" source="SERVC_TYPE_2">
              <element name="Q5_ZONE_DESC" value="Q5_ZONE_DESC"/>
              <element name="Q5_SERVICE_COST" value="Q5_SERVICE_COST"/>
              <element name="Q5_TICKET_ID" value="Q5_TICKET_ID"/>
              <element name="Q5_WO_END_DATE" value="Q5_WO_END_DATE"/>
              <element name="Q5_QUALITY_RATING_1" value="Q5_QUALITY_RATING_1"/>
              <element name="Q5_QUALITY_RATING_2" value="Q5_QUALITY_RATING_2"/>
              <element name="Q5_QUALITY_RATING_3" value="Q5_QUALITY_RATING_3"/>
         </group>     
         <group name="G_SERVC_TYPE_3" source="SERVC_TYPE_3">
              <element name="Q6_ZONE_DESC" value="Q6_ZONE_DESC"/>
              <element name="Q6_QUALITY_RATING_1" value="Q6_QUALITY_RATING_1"/>
              <element name="Q6_QUALITY_RATING_2" value="Q6_QUALITY_RATING_2"/>
              <element name="Q6_QUALITY_RATING_3" value="Q6_QUALITY_RATING_3"/>
              <element name="Q6_QTY_MISSING_1" value="Q6_QTY_MISSING_1"/>
              <element name="Q6_QTY_MISSING_2" value="Q6_QTY_MISSING_2"/>
              <element name="Q6_QTY_MISSING_3" value="Q6_QTY_MISSING_3"/>
         </group>
    </dataStructure>
    </dataTemplate>

    Hello user6428199,
    When you use ":Q1_STORE_ID" in your queries, BI Publisher looks for a report parameter named Q1_STORE_ID. Change all your report queries to get data for all the store_id's available. As you are bursting the report using the store_id as the bursting key, BI Publisher will split the report based on the stored_id and delivers content based on it. No matter how many queries you may have, BI Publisher will loop through all the store_id's available and all the queries will return data for that particular id in a report.
    Thanks,
    Machaan

  • When I enter my password to start my atv it tells me, that "there was a problem connecting to the network."  My Ipad works fine but not my new atv.  I have reset my password multiple times with no help.  I have also rebooted my wireless server.take it bac

    When I enter my password to start my atv it tells me, that "there was a problem connecting to the network."  My Ipad works fine in my house, but not my new atv.  I have reset my password multiple times with no help.  I have also rebooted my wireless server.  Do I take it back?

    Where is everyone????  Does anyone have an answer???
    Allik1

  • Report with Multiple queries too slow in BI Publisher 11g

    Hi, I have a report in 11g where i need to create multiple queries to show them in report. I tried to combine everything in one query, but i found that the query is too huge and hard to understand and maintain. I created 3 data sets and linked them together. In SQL dev, the main query is returning about 315 records and first detail query returns less than 100 records and second detail query is returning one record which is BLOB. Each query returns data within a couple of seconds from SQL Developer. The entire report from BI Publisher should be just 21 page PDF output. Did anyone face performance issues while running reports with multiple queries in 11g? I ran reports that have single query which returned 10K pages PDF and never had an issue while everthing is in one query. This is the first time Iam attempting to create multiple queries. Can someone help me understand what i might be doing wrong or missing here. Thank you.

    Isn't there a way for you to do this via a Package/Procedure versus having multiple queries?
    Per the BI Publisher guide,
    Following are recommended guidelines for building data models:
    Reduce the number of data sets or queries in your data model as much as possible. In general, the fewer data sets and queries you have, the faster your data model will run. While multiquery data models are often easier to understand, single-query data models tend to execute more quickly. It is important to understand that in parent-child queries, for every parent, the child query is executed.
    You should only use multiquery data models in the following scenarios:
    To perform functions that the query type, such as a SQL query, does not support directly.
    To support complex views (for example, distributed queries or GROUP BY queries).
    To simulate a view when you do not have or want to use a view.
    Thanks,
    Bipuser

  • Question about templates with multiple queries

    I am just starting out with BI Publisher, v.10.1.3.2. I have a report that has multiple queries, but my template is just based on 1 query. How can I make the template use more than one query?
    Thanks!!

    <!-- BI Publisher Report Data Template --!>
    <!-- Report: -->
    <!-- defaultPackage - the PL/SQL package name to resolve any lexical
    references, group filters, or data triggers defined in the template. -->
    <dataTemplate name="dataTemplateName" description="DESCRIPTION" dataSourceRef="ORCL" defaultPackage="<SCHEMA>.<PACKAGE>" version="1.0">
    <properties>
    <property name="include_parameters" value="True|False"></property>
    <property name="include_null_Element" value="True|False"></property>
    <property name="xml_tag_case" value="upper|lower"></property>
    <property name="db_fetch_size" value="500"></property>
    <property name="scalable_mode" value="on|off"></property>
    <property name="include_rowsettag" value="true|false"></property>
    <property name="debug_mode" value="on|off"></property>
    </properties>
    <parameters>
    <parameter name="IDENTIFIER" dataType="character|date|number" defaultValue="0" include_in_output="true|false"></parameter>
    </parameters>
    <!-- Flexfield support for queries against Oracle Applications database -->
    <lexicals>
    <lexical></lexical>
    </lexicals>
    <dataQuery>
    <xml name="xml_query_name" expressionPath="Xpath_expression">
    <url method="GET|POST" realm="auth_name" username="" password="">file:///d:/windir/filename.xml</url>
    </xml>
    <sqlStatement name="query_name">
    <![CDATA[
    SELECT
    FROM
    WHERE
    ]]>
    </sqlStatement>
    </dataQuery>
    <!-- If you have multiple queries, you must link them to create the -->
    <!-- appropriate data output. In the data template, there are two methods -->
    <!-- for linking queries: using bind variables or using the <link> element -->
    <!-- to define the link between queries. -->
    <link parentQuery="parent_query_name" parentColumn="col" childQuery="child_query_name" childColumn="col" condition="= < <= > >="></link>
    <dataTrigger name="beforeReport" source="<package_name>.<function_name>"></dataTrigger>
    <!-- (Required for multiple queries) Defines the structure of the output -->
    <!-- XML. Consists of <group> and <element>elements to specify the -->
    <!-- structure. This section is optional for single queries; if not -->
    <!-- specified, the data engine will generate flat XML. -->
    <dataStructure>
    <group name="group_tag_name" source="query_name" groupFilter="<package_name>.<function_name>">
    <element name="tag_name" value="source_column" function="SUM() COUNT() AVG() MIN() MAX()"></element>
    <element name="tag_name" value="<group_name>.<column/alias name>" function="SUM() COUNT() AVG() MIN() MAX()"></element>
    <group name="group_tag_name" source="query_name" groupFilter="<package_name>.<function_name>">
         <element name="tag_name" value="source_column" function="SUM() COUNT() AVG() MIN() MAX()"></element>
         <element name="tag_name" value="<group_name>.<column/alias name>" function="SUM() COUNT() AVG() MIN() MAX()"></element>
    </group>
    </group>
    </dataStructure>
    <dataTrigger name="afterReport" source="<package_name>.<function_name>"></dataTrigger>
    </dataTemplate>

  • SQL Developer cannot execute multiple queries in one connection

    Hi,
    Using : SQL Developer 1.2.29.98, Oracle Database 9i on Windows XP.
    Currently I have TOAD and PL/SQL Developer to handle things related to Oracle Database.
    I found this SQL Developer tools as an interesting tool which might replace PL/SQL Developer (I assume).
    I opened two SQL Worksheets and tried to execute 2 queries (time consuming one) simultanously, suddenly it freezes (the window become grayed). Just like TOAD, we cannot smoothly execute multiple queries on single connection on SQL Developer
    I can monitor the query process using TOAD (Session Browser) and found both queries are running while SQL Developer window become grayed and seems not functioning. After the queries have been finished, I mean both of them, the SQL Developer window become normal and "alive" again showing the expected results.
    Well, however PL/SQL Developer could handle this. Executing multiple queries in single application is just its unbeatable features.
    We can view the query result once its finished instead of until the others being processed, by just only switch the SQL Windows.
    Is it true that SQL Developer doesn't support executing multiple queries?
    Or is it a feature which we should request?
    Or we have to activate this feature by doing some changes on configuration / preferences?
    (Do we need to open two SQL Developer instances? what a memory consuming solution).
    Regards,
    Buntoro

    SQLDeveloper connections are single threaded and also rather single minded (in that you can't do much else while a long query is running.)
    There is an existing feature request http://apex.oracle.com/pls/otn/f?p=42626:39:3685254426061901::NO::P39_ID:4202 for which you can vote.
    The workaround is to have multiple connections. Not brilliant but it works.

  • Unable to connect via RDP 5.2 when multiple RDP-TCP connection setup with NLA disable

    Hi All,
    Need help urgently, I had setup a multiple RDP-TCP connection for separate RDP connection with different IP.
    Problem I face after setting up multiple RDP-TCP connection, the old version of RDP 5.2 non longer working even with NLA disable. RDP 6 and above no problem connecting to the RDP session.
    Error message on RDP 5.2 shown as:
    "Because of security error, the client could not connect to the remote computer. Verify that you are logged on the network, and then try connection again."

    Hi,
    Please try the steps in the article below and see how it works.
    Because of a security error, the client could not connect to the Terminal Server
    http://support.microsoft.com/kb/329896
    Thanks.
    Jeremy Wu
    TechNet Community Support

Maybe you are looking for