Problem of a combined graph

Hi, guys:
I am trying to build a combined graph with bars and line. I built two series of query.
series 1 for bar chart:
select null link, to_char(inv.invdate) label, sum(inv.amt) total$
from invoices inv, payments pa, clients cl,
(select to_date(:P390_DP_START_DATE,'MM/DD/YYYY') + rownum -1 date_in_range
from all_objects
where rownum <= to_date(:P390_DP_END_DATE,'MM/DD/YYYY')-to_date(:P390_DP_START_DATE,'MM/DD/YYYY')+1) days_in_period
where inv.invoicekey=pa.invoicekey
and cl.clientkey=inv.clientkey
and inv.invdate=days_in_period.date_in_range
and inv.debtorkey not in (11352, 11353)
and exists (select tr3.transkey
from transactions tr3
where tr3.transkey=pa.transkey
and tr3.type=1)
group by inv.invdate
order by inv.invdateseries2 with line chart
SELECT null link, to_char(days_in_period.date_in_range) label, count(cl2.clientkey) "Total Factored Clients"
FROM Clients cl2, 
(select to_date(:P390_DP_START_DATE,'MM/DD/YYYY') + rownum -1 date_in_range
from all_objects
where rownum <= to_date(:P390_DP_END_DATE,'MM/DD/YYYY')-to_date(:P390_DP_START_DATE,'MM/DD/YYYY')+1) days_in_period
where exists
(select tr.transkey
from transactions tr
where tr.clientkey=cl2.clientkey
and tr.type=1
and trunc(days_in_period.date_in_range)-1-trunc(tr.postdate) <= 90
group by days_in_period.date_in_range
order by days_in_period.date_in_rangeHowever, the first query returns less rows than the second query, as there are some days such as weekend without total$, but with Factored Clients. In the combined graph, it shows first only rows with data for both query, and then show dates with only Factored Clients. How can I solve this problem in APEX or I have to make sure there are same number of rows in both series?
Thanks.
Sam

"but am unable to do so" doesn't explain anything. What, exactly, is your problem? You can't make it compile? The graph comes out upside down?
Before you reply, please click the link "special tokens" above the Subject of a reply. That will show you how to post code.
Next thing is to comment closing curly braces that are more than a short distance from their opener:
  } // end of foo()
} // end of class BarNext thing is to use methods. For example, that huge set of if tests to set "scale" should be moved into a method that sets scale:
  public void paint( Graphics g ) {
    scale = setScale( maxValue );
  } // end of paint()
  private int setScale( int max ) {
    if ( . . . // etc.
} // end of class BarGraphAppAnother thing would be to add "else" keywords so that those "if"s wouldn't all be tested:
  if ( max > this && max < that ) scale = x;
  if ( max > this2 && max < that2 ) scale = y;
  // should be:
  if ( max > this && max < that ) scale = x;
  else if ( max > this2 && max < that2 ) scale = y;In the second way, the second test isn't evaluated if the first one is true and "scale" is set to "x".
And while I'm looking at that particular piece of the code, how about replacing most of it with:
  private int setScale( int max ) {
    if ( max < veryLargeWhichIsSpecialCase )
      return (max + 599)/600;
    // special case goes here
  } // end of setScale()Implement some of this, and then repost the relevant section of code with a specific question, like "why does the graph come out backwards?"

Similar Messages

  • How to make the values of a combination graph (bar and line) visible always

    Hi ,
    I am using jdev 11.1.1.6
    i have created a combination graph which has a bar and line.
    The data with respect to bar and graph were only visible when i keep the mouse pointer on it.
    i need to set the values visible always.
    kindly let me know how to make it.
    In pie graph its by default showing the data always.
    regards
    Siva

    Hi Sameh Nassar,
    Thanks for the input, am using the combination graph and i dont have this property added till now.
    i tried adding them manually in source but it didn't work. so I assume that this property is good with pie chart alone.
    please correct me if am wrong.
    This is my combination graph structure.
        <dvt:comboGraph id="comboGraph1"
                          value="#{bindings.testVO1.graphModel}"
                          subType="COMBINATION_VERT_ABS_2Y" shortDesc="Graph 1">
            <dvt:background>
              <dvt:specialEffects/>
            </dvt:background>
            <dvt:graphPlotArea/>
            <dvt:seriesSet markerDisplayed="true">
              <dvt:series lineWidth="0"/>
            </dvt:seriesSet>
            <dvt:o1Axis/>
            <dvt:y1Axis/>
            <dvt:y2Axis/>
            <dvt:legendArea automaticPlacement="AP_NEVER"/>
            <dvt:graphTitle text="Combination graph"/>
            <dvt:o1Title text="x axis"/>
            <dvt:y1Title text="y1 axis"/>
             <dvt:y2Title text="y2 axis"/>
          </dvt:comboGraph>
    regards
    Siva

  • Graph wizard on reports 9i( regarding dual Y combination graph)

    I have the following columns for my report with the values as follows
    Area1 : 20
    Area2 : 30
    Area3 : 40
    Sales1 : 1000
    Sales2: 2000
    Sales3: 3000.
    x_axis : week.
    I would like to have by Y axis with the values 10, 20 ... range and have the columns Area1,Area2 to use the Y axis.
    I would like to have by Y1 axis with the values 1000,2000,... range and have the columns sales1,sales2 to use Y1 axis.
    Can I do this?
    With the dual combination graph now it displays all the columns in 2 different scales and I do not want that.
    Any help would be greatly appreciated
    Thanks,
    KK

    Hi Laura
    One workround would be to create a new query in the Data Model that includes desired fields, and then source
    chart to the new group.
    FYi, bug2527100 was filed on this issue and is already fixed. The fix would be available in 9i Reports 9.0.2.2 patch. Reports 9.0.2.2 patch is scheduled to be released on Mar 05 2003 (tentative date).
    Thanks
    The Oracle Reports Team

  • Is it possible to have a combination graph chart with a stacked vertical br

    I have the following XML data :
    - <ROWSET>
    - <ROW>
    <Z_CUSTOMER>ACME</Z_CUSTOMER>
    <Z_REGION>SPAIN</Z_REGION>
    <Z_YEAR>2009</Z_YEAR>
    <Z_MONTH>01</Z_MONTH>
    <Z_SALES>100</Z_SALES>
    <Z_SALES_PREV>50</Z_SALES_PREV>
    <Z_SALES_PREV2>90</Z_SALES_PREV2>
    </ROW>
    - <ROW>
    <Z_CUSTOMER>ACME</Z_CUSTOMER>
    <Z_REGION>SPAIN</Z_REGION>
    <Z_YEAR>2009</Z_YEAR>
    <Z_MONTH>02</Z_MONTH>
    <Z_SALES>300</Z_SALES>
    <Z_SALES_PREV>50</Z_SALES_PREV>
    <Z_SALES_PREV2>40</Z_SALES_PREV2>
    </ROW>
    - <ROW>
    <Z_CUSTOMER>ACME</Z_CUSTOMER>
    <Z_REGION>SPAIN</Z_REGION>
    <Z_YEAR>2009</Z_YEAR>
    <Z_MONTH>03</Z_MONTH>
    <Z_SALES>600</Z_SALES>
    <Z_SALES_PREV>35</Z_SALES_PREV>
    <Z_SALES_PREV2>80</Z_SALES_PREV2>
    </ROW>
    - <ROW>
    <Z_CUSTOMER>ACME</Z_CUSTOMER>
    <Z_REGION>SPAIN</Z_REGION>
    <Z_YEAR>2009</Z_YEAR>
    <Z_MONTH>04</Z_MONTH>
    <Z_SALES>700</Z_SALES>
    <Z_SALES_PREV>350</Z_SALES_PREV>
    <Z_SALES_PREV2>90</Z_SALES_PREV2>
    </ROW>
    - <ROW>
    <Z_CUSTOMER>ACME</Z_CUSTOMER>
    <Z_REGION>FRANCE</Z_REGION>
    <Z_YEAR>2009</Z_YEAR>
    <Z_MONTH>01</Z_MONTH>
    <Z_SALES>100</Z_SALES>
    <Z_SALES_PREV>60</Z_SALES_PREV>
    <Z_SALES_PREV2>70</Z_SALES_PREV2>
    </ROW>
    </ROWSET>
    I have produced a report based on this data which uses a combination graph chart. The sales for the current year are shown as a vertical bar for each month while the previous year and previous year but one are shown as lines. The report produces the correct output but I would like to add an extra feature
    so that the vertical bar for the current year is shown as a stacked vertical bar so that the sales from each region can be seen within the bar rather than the bar just showing total sales. Is this possible byt altering the chart options within the template builder or would it be necessary to write some XSL code to do this ?

    Yes and no, here's an example of stacked bar and area graph.
    chart:
    <Graph stylePath="/oracle/dss/graph/styles/projection.xml" seriesEffect="SE_AUTO_GRADIENT" graphType="LINE_VERT_STACK">
      <LegendArea visible="true" fillColor="#FFFFFF" fillTransparent="false" borderColor="#000000" borderTransparent="false" automaticPlacement="AP_NEVER" position="LAP_RIGHT"/>
      <Title text="Margin Forecast Trending" visible="true" horizontalAlignment="CENTER">
        <GraphFont name="Arial Black" size="16" bold="true" italic="false" underline="false"/>
      </Title>
      <SeriesItems>
        <Series id="0" color="#FFFF00" lineStyle="LS_SOLID"/>
        <Series id="1" color="#0000FF" lineStyle="LS_DASH"/>
        <Series id="2" color="#FF0000" lineStyle="LS_DOTTED"/>
        <Series id="3" color="#00FF00" lineStyle="LS_DASH_DOT"/>
      </SeriesItems>
      <Y1Axis lineWidth="1" lineColor="#DDDDDD" ascending="true" axisLocation="AL_LEFT" visible="true" axisMinAutoScaled="true" axisMaxAutoScaled="true" majorTickStepAutomatic="true">
        <ViewFormat numberType="NUMTYPE_GENERAL" numberTypeUsed="true" decimalDigit="0" decimalSeparatorUsed="true" decimalDigitUsed="true" scaleFactor="SCALEFACTOR_NONE" scaleFactorUsed ="false"/>
      </Y1Axis>
      <LegendText>
        <GraphFont name="Arial Black" size="12" bold="false" italic="false" underline="false"/>
      </LegendText>
      <O1Title text="Forecast as of" visible="true">
        <GraphFont name="Arial Black" size="11" bold="true" italic="false" underline="false"/>
      </O1Title>
      <Y1Title text="Dollars" visible="true">
        <GraphFont name="Arial Black" size="11" bold="true" italic="false" underline="false"/>
      </Y1Title>
      <Y1TickLabel>
        <GraphFont name="Arial Black" size="9" bold="false" italic="false" underline="false"/>
      </Y1TickLabel>
      <O1TickLabel>
        <GraphFont name="Arial Black" size="9" bold="false" italic="false" underline="false"/>
      </O1TickLabel>
      <LocalGridData colCount="{count(xdoxslt:group(.//G_GRAPH|.//G_ZERO_GRAPH[count(//G_GRAPH)=1],  'PFP_DATE'))}" rowCount="4">
        <RowLabels>
          <Label>Margin Plan</Label>
          <Label>Base Fee</Label>
          <Label>Forecast at Completion</Label>
          <Label>Margin Forecast</Label>
        </RowLabels>
        <ColLabels>
          <xsl:for-each select=".//G_GRAPH|.//G_ZERO_GRAPH[$grp_cnt=1]" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <Label>
              <xsl:value-of select="PFP_DATE"/>
            </Label>
          </xsl:for-each>
        </ColLabels>
        <DataValues>
          <RowData>
            <xsl:for-each-group select=".//G_GRAPH|.//G_ZERO_GRAPH[$grp_cnt=1]" group-by="PFP_DATE" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
              <Cell>
                <xsl:value-of select="sum(current-group()/MARGIN_PLAN)"/>
              </Cell>
            </xsl:for-each-group>
          </RowData>
          <RowData>
            <xsl:for-each-group select=".//G_GRAPH|.//G_ZERO_GRAPH[$grp_cnt=1]" group-by="PFP_DATE" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
              <Cell>
                <xsl:value-of select="sum(current-group()/BASE_FEE)"/>
              </Cell>
            </xsl:for-each-group>
          </RowData>
          <RowData>
            <xsl:for-each-group select=".//G_GRAPH|.//G_ZERO_GRAPH[$grp_cnt=1]" group-by="PFP_DATE" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
              <Cell>
                <xsl:value-of select="sum(current-group()/FORECAST_AT_COMPLETION)"/>
              </Cell>
            </xsl:for-each-group>
          </RowData>
          <RowData>
            <xsl:for-each-group select=".//G_GRAPH|.//G_ZERO_GRAPH[$grp_cnt=1]" group-by="PFP_DATE" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
              <Cell>
                <xsl:value-of select="sum(current-group()/MARGIN_FORECAST)"/>
              </Cell>
            </xsl:for-each-group>
          </RowData>
        </DataValues>
      </LocalGridData>
    </Graph>

  • Combination graph in Forms9i using BI beans

    Does anybody knows how to do a combination graph in forms 9i using BI beans? I am trying to get a vertical stacked bar and line graph combo to work but haven't succeeded yet.

    Denis,
    the demo is part of teh Demo extension pack 1 at http://otn.oracle.com/sample_code/products/forms/index9i.html. You need to first install the demo base pack.
    However, the feature you are asking for is not implemented in this version of the demo. I am working on a next (enhanced) version of this demo that already has this feature implemented.
    Frank

  • Is it possible to combine graph ?

    Hi all,
    I've been looking for a way to combine two types of graph, for example, combining a bar graph and a line graph. The use case is that the bar graph shows ratio to report data, and we'd like the line bar to show a trend.
    Is a such thing possibile ? How ?
    Thanks
    Regards,Fred

    Hi Frederic,
    it's not clear to me what it is that you want.
    Do you need two graphs on the same collection ?
    Do you need one graph which contains a bar and a line graph ?
    In the last case you might want to take a look at the combination graph which can combine bar, line and area graphs.
    A combination graph is similar to the other simple graph types in terms of data requirements.
    Regards Luc

  • Problem on drawin a graph

    I'm a just beginner in Swing.I want to draw a graph on a frame.My problem is.....:in the o/p window graph is just become disable afterit came.it will reappear whwn we maximize thhe o/p window...my part of code is following:
    public void paint(Graphics g) {//main graph drawing part
              super.paint(g);
              Graphics2D g2 = (Graphics2D)g;
              g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
              for(i=0;i<ss2;i++){//assigning the the values of FROM node and TO node
                   pf=p[Integer.parseInt(str2[i][0])];
                   pt[i]=p[Integer.parseInt(str2[i][2])];
              for(i=0;i<ss2;i++){//to print the value like a,b,c...
                   xf=pf[i].x;
                   yf=pf[i].y;
                   xt=pt[i].x;
                   yt=pt[i].y;
                   xm=(xf+xt*3)/4;
                   ym=((yf+yt*3)/4)-5;
                   sssss=str2[i][1].charAt(0);
                   g2.setColor(Color.black);
                   if(xf==xt&&yf==yt){
                        g2.drawArc(xf,yf,35,20,0,360);
                        g2.drawString(Character.toString(sssss),xf+15,yf+12);
                   else{
                        g2.drawLine(xf,yf,xt,yt);
                        g2.setColor(Color.black);
                        g2.drawString(Character.toString(sssss),xm,ym);
                        g2.fillOval(m,n,7,7);
              for(i=0;i<sc1;i++) {//for loop to draw the circle class to draw circles
                   int _x;
                   int _y;
                   _x=(p[i].x-10);
                   _y=(p[i].y-10);
                   if(str1[i][3].equals("1")){
                   g2.setColor(Color.PINK);
                   g2.fillOval(_x, _y,20,20);
                   x=0;y=0;
              else if(str1[i][3].equals("2")){
                   g2.setColor(Color.CYAN);
                   g2.fillOval(_x, y,20,20);x=0;_y=0;
              else if(str1[i][3].equals("4")){
                   g2.setColor(Color.YELLOW);
                   g2.fillOval(_x, y,20,20);x=0;_y=0;
              else{
                   g2.setColor(Color.ORANGE);
                   g2.fillOval(_x, y,20,20);x=0;_y=0;
              for(i=0;i<sc1;i++){//to put the node name like 1,2...i'll changed it to Q0,Q1,... later
                   g2.setColor(Color.BLACK);
                   g2.drawString(Integer.toString(i),p[i].x,p[i].y);

    Comments:
    If you had gone through the painting tutorial linked, you would know that custom painting is not normally performed on a JFrame. And knowing that, you would find no reason to extend JFrame.
    If you had taken a look at the API you would know that JFrame doesn't have a method paintComponent.
    If you had gone through the Swing tutorial linked, you would know about concurrency in Swing, and that the GUI should be launched on the EDT.
    So. With the wealth of knowledge already available in the tutorials, do you really think forum members should waste their time teaching you the basics? Please go through the changed code and post back what you conclude about the differences that make it work.
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class FrameTest {
       int px, py, ox, oy;
       JFrame frame;
       JPanel panel;
       FrameTest(String title, int x1, int y1, int x2, int y2){
          frame = new JFrame(title);
          px = x1;
          py = y1;
          ox = x2;
          oy = y2;
       private void makeUI() {
          panel = new JPanel() {
             public void paintComponent(Graphics g){
                super.paintComponent(g);
                g.drawLine(px, py, ox, oy);
          frame.setContentPane(panel);
          frame.setSize(300, 300);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setVisible(true);
       public static void main(String args[]) {
          SwingUtilities.invokeLater(new Runnable() {
             public void run() {
                new FrameTest("Show", 10, 10, 100, 100).makeUI();
    }db

  • Problems to generate a graph using 2 views as 2 curves

    Hello everybody
    Please help me fix this problem.
    Oracle 9i Database,reports-->graph wizard
    I have 2 views in the database named FR1,FR2 and these 2 views are nothing but snapshots of data from a single table WDATA for selected data .
         The views are like this
         FR1                         FR2
         NO number(10)                    NO number(10)
         VALUE number(10)               VALUE number(10)
         Each view has 20 records of data
    I need to generate a graph for the 2 views as 2 curves in graph for analysis with NO as X axis and VALUE as Y axis.
    |.::::.
    |
    |________
    But i couldn't manage to generate them.
    When i write a query in report wizard like this
    SELECT * FROM FR1 UNION SELECT * FROM FR2
    I get 40 records but as a single view thereby not possible to generate 2 curves..In this case i get 1 curve with 40 points.
    and if I say
    SELECT * FROM FR1,FR2
    I get 400 records as cartesian product of the 2 views which makes no sense.
    Some one out there please help me..
    Is my approach correct for generating graphs?
    i'm using 9iDS and 9i DB
    thanx in advance
    regards
    Jochen

    jochen,
    you need to join the two tables but use a where clause to prevent a cartesian product.
    so the following select should work
    select a.no, a.value, b.value
    from fr1 a, fr2 b
    where a.no = b.no
    regards,
    philipp

  • Problems with express xy graph

    Hi,
    I am new to Labview. I am using Labview 8.5. I wish to create a program which reads in an excel spreadsheet and displays the data on an express xy graph. I have been able to read my excel spreadsheet into labview but cannot display a graph in my express xy graph. The express xy graph plots only one point and I do not understand why. I would be grateful if someone could please advise me on what the problem could be. The block diagram is shown below.
    Your help is very much appreciated. Thank You.
    Dibz

    To elset191: I have actually added a transpose array between the Read From Spreadsheet and the express xy graph and it now displays a full graph! Thank you. I mistakenly thought the xy graph read in the data in columns rather than rows. However, the y-axis values is a 2D array. Therefore, ideally I would like each row of this data to generate its own plot on the xy graph. Can it do this? At the moment the express xy graph looks like its only reading in the first row of y-axis 2D array. Would I be able to somehow show multiple plots on the express xy graph for each row of the data?
    To Dennis Knutson: Apologies, but i thought it would have been assumed that as you cannot read in native excel files as you said, then obviously I had converted the file if I initially stated I had read it into Labview. Also, as stated above the y-axis is actually a 2D array which is why I used the 2D array to display it. Granted, the x-axis values is a single array but no problems were incurred so I did not get around to changing it. 

  • Problems with Flash Line Graphs

    I have two problems with the new Flash Line Graphs in APEX 3.1
    1. I have created a query that returns a set number of rows. Sometimes the VALUE for a specific row might be null. When this occurs the LABEL data does not show up on the X axis. I want the LABEL data to show up no matter what. How do I accomplish this?
    2. Related to the above query. When the VALUE field is null for 3 records (or more) in a row, not only does the LABEL data for those records not display, the VALUE and LABEL data for the records that appear in the set after these 3 records also do not display. If one or even two null VALUE fields appears in a row, things are still OK. What do I need to do to get all my data to display?
    Any help would be appreciated.
    THANKS
    Raymond

    Raymond,
    For the Interactive report chart issue, could it be related to this?
    Re: Apex 3.1. Interactive Report. Questions and Problems.
    Interactive Report. Chart. Seems to be bug...
    - Christina

  • Problem with customization of graph

    Hi experts,
    I am facing some problem in customizing graphs created through Report Builder. I am having some values on x-axis like employee name (emp-code).
    e.g. Janak Nirmal (007)
    I did one thing that i m only displaying emp-code on x-axis. i.e. 007
    now i want to show user also which emp-code is bind to employee name any where in graph.
    i.e. 007=Janak Nirmal
    is this customization possible ?
    how do i include it in jsp page ? how do i customize graph x-axis.
    Is there any way to do this ?
    Please help me i m in critical stage of project
    Thanks in advance.
    Janak

    Can any one help ?
    Please i need help.
    Regards
    Janka

  • Problem with SDO_FILTER combined with Timestamp and Order By using JDBC

    I'm having a problem with using SDO_FILTER. I've included a test driver below. It seems that I'm having a problem with combining the SDO_FILTER, Timestamp, ORDER BY and a nested table using the Oracle 11.1.0.7.0 driver against Oracle 11g. The below query queryNoWork results in the following error:
    Caused by: java.sql.SQLException: ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "MDSYS.SDO_3GL", line 1320
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
    at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3488)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:299)
    All of the other query variations seem to work. The GEOM column referenced is a Linestring that has only 2 points, start and end. Any help on this would be greatly appreciated. Thanks!
    import java.math.BigDecimal;
    import java.sql.Connection;
    import java.sql.Date;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Timestamp;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Enumeration;
    public class QueryTester
         public static void main(String[] args)
              try
                   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                   ArrayList<Object> queryParameters = new ArrayList<Object>();
                   queryParameters.add(new BigDecimal(0));
                   queryParameters.add(new Double(0));
                   queryParameters.add(new BigDecimal(180));
                   queryParameters.add(new Double(90));
                   queryParameters.add(new java.sql.Date(sdf.parse("2005-12-25").getTime()));
                   queryParameters.add(new java.sql.Date(sdf.parse("2005-12-26").getTime()));               
                   BigDecimal one = new BigDecimal(1);
                   DriverManager.registerDriver((Driver) Class.forName("oracle.jdbc.driver.OracleDriver").newInstance());
                   Enumeration<Driver> drivers = DriverManager.getDrivers();
                   while(drivers.hasMoreElements())
                        System.out.println(drivers.nextElement().getClass().getName());
                   Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@xxxx:1521:xxxx", "xxxx", "xxxx");
                   String queryNoWork = "select * from (select ROWNUM rowcount, a.* from (select * from TRACK_SEGMENTS where ( ( sdo_filter(GEOM, sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array(?, ?, ?, ?) ), 'MASK=ANYINTERACT') = 'TRUE' and END_DATE >= ?and START_DATE < ?) and 1 = 1 and 1 = 1) and ((START_DATATYPE = 'maritime_dense')) ORDER BY ID ) a) where rowcount between 1 and 30000";
                   String queryWorks0 = "select * from (select ROWNUM rowcount, a.* from (select * from TRACK_SEGMENTS where ( ( sdo_relate(GEOM, sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array(?, ?, ?, ?) ), 'MASK=ANYINTERACT') = 'TRUE' and END_DATE >= ?and START_DATE < ?) and 1 = 1 and 1 = 1) and ((START_DATATYPE = 'maritime_dense')) ORDER BY ID ) a) where rowcount between 1 and 30000";
                   String queryWorks1 = "select * from (select ROWNUM rowcount, a.* from (select * from TRACK_SEGMENTS where ( ( sdo_filter(GEOM, sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array(?, ?, ?, ?) ), 'MASK=ANYINTERACT') = 'TRUE' and END_DATE >= TO_TIMESTAMP('2005-12-25','YYYY-MM-DD') and START_DATE < TO_TIMESTAMP('2005-12-26','YYYY-MM-DD')) and 1 = 1 and 1 = 1) and ((START_DATATYPE = 'maritime_dense')) ORDER BY ID ) a) where rowcount between 1 and 30000";
                   String queryWorks2 = "select * from (select ROWNUM rowcount, a.* from (select * from TRACK_SEGMENTS where ( ( sdo_filter(GEOM, sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array(?, ?, ?, ?) ), 'MASK=ANYINTERACT') = 'TRUE' and END_DATE >= ?and START_DATE < ?) and 1 = 1 and 1 = 1) and ((START_DATATYPE = 'maritime_dense')) ) a) where rowcount between 1 and 30000";
                   String queryWorks3 = "select * from TRACK_SEGMENTS where ( ( sdo_filter(GEOM, sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array(?, ?, ?, ?) ), 'MASK=ANYINTERACT') = 'TRUE' and END_DATE >= ?and START_DATE < ?) and 1 = 1 and 1 = 1) and ((START_DATATYPE = 'maritime_dense')) ORDER BY ID";
                   String query = queryWorks0;
                   PreparedStatement s = conn.prepareStatement(query);
                   int parameterIndex = 0;
                   for (Object object : queryParameters) {
                        if (object instanceof Timestamp)
                             s.setDate(++parameterIndex, (Date) object);
                        else
                             s.setObject(++parameterIndex, object);
                   s.execute();
                   ResultSet results = s.getResultSet();
                   results.next();
                   System.out.println("executed query - " + results.getLong(1));
              catch (Exception e)
                   e.printStackTrace();
    }

    Is the TRACK_SEGMENTS table partitioned ?
    It looks like in the case where the SQL does not work, it is not using the Spatial index. So can you add some index hints
    in the query to force it to use the spatial index TRACK_SEGMENTS table ?
    siva

  • Problems to print xy-graph

    Hi!!
    I have problems to print a xy-graph...it gives a error:
    "append control image to report.vi is not acceptable"...Least if I try to use...
    I attached a file for my project...
    Attachments:
    ThemMonitoringSystemMOD(print).vi ‏149 KB

    I see, its still the same problem described in your other thread DAQmxbaseRead.vi error.
    The correct error message is, that a subvi is not executable..
    This is, as Wolfgang wrote, because two SubVIs accidentally have the same name. One of them is in the report palette, the other one in the daqmx palette. LabVIEW cannot handle this - only one VI will be in memory and the other one will be replaced, which leads to the error that the vi cannot be executed.
    Until this issue is going to be solved with the next daqmx driver you will have to rename the instance of the vi that is part of daqmxbase.
    Since this vi is hidden quite deeply inside the library its best to first close all labview windows, then open a new vi and place the daqmxbase read function inside. Open the VI Hierarchay (Browse meny). In the hierarchy window, go to the menu edit-> find. Search for object, as object choose VI by name. select the check data size.VI
    Once you found the vi inside the hierarchy, doubleclick it and choose save as... Save it with a different name and make sure this new name is used in the hierarchy window as well. The daqmxBase functions must be linked to the VI with the new name. Thus, closing the windows now and being asked if you want to save the changes you have to click yes.
    I hope this explanation will help you to get your code running.
    Ingo Schumacher
    Systems Engineer Sound&VibrationNational Instruments Germany

  • Combining graphs

    Is it possible to combine two graphs into one or to have a single graph that can graph data from two sources in different colors but in the same graph window so that there values can be compared on the fly?
    Thanks
    Ty

    Which version of LabVIEW are you using??
    I have tried to save if for LabVIEW 7.1 and attached it along with this post.
    Let me know if this works
    If not, find attached a pic of the vi with modifications in 'False' case.
    Just incorporate them in both the cases
    Attachments:
    bundle5.vi ‏580 KB
    bundle.PNG ‏29 KB

  • Graph connectivity problem-adjacency list-connected graph-Theta complexity

    I am stuck up on this problem:
    I want to find an algorithm of Theta(n+m) complexity, which will examine
    if a non-directed graph is connected (synectic).
    We assume that the representation of the graph has been made with an
    adjacency list with n vertices and m edges.
    Thanks in advance.

    A BFS or DFS from any node in your graph should be T(n+m) in case of an adjacency list (instead of a adjacency matrix). When the search is finished, compare the number of visited nodes to the total number of nodes in the graph. If they're not equal, the graph is not connected.

Maybe you are looking for

  • To get the reflection of a variable arity method.

    Hi, I am having public static Object myMethod(Object... args)I need to return the rfletion of this method. I have tried out the following, but it throws an error of mismatch in the number of arguments when I pass more than one argument. return cls.ge

  • Creating a time tracking graph in Numbers

    I need to make a chart of an employee's time into work.  I tried inputting time format but didn't graph/chart it. How do I do this AND show the expected arrival time (they've been coming in late). Thanks

  • How to find the average a key figure in bex

    Hi All, I have a fey kigure (ZAMOUNT) which is amout field. So if there are 'n' records, I need to calculate the average of the amount field(AVERAGEAMT) for those n records. Example:                      EMPLOYEE      ZAMOUNT        AVERAGEAMT record

  • Keyboard issue in new PB SD

    Keyboard Problem: 1.) After sleep, i can not input any character in Finder, however, can input smoothly in other applications (e.g. TextEdit...) 2.) After I chose several pictures in the Finder and started Slideshow, the keyboard stops working. Envir

  • Search local drive

    hi - before my application starts , i want to scan users local drive to see which internet browsers(IE, Netscape etc) is on his local machine. - after the scan is over , i want to display him the browsers on his machine i need help in writing java co