Complex Average question

I was wondering if I could put the following requirement into a single member formula:I need to calculate the average value of a level 0 time member of the descendants of the current member.For example, If I select Qtr1, I need the average of Accounts Balance for the days (level 0) that make up Qtr1. If I select Qtr2, I need the average Accounts Balance for the days of Qtr2.I tried the following formula, but it wasn't right:@AVGRANGE(SKIPBOTH, "ACCOUNT BALANCE",@LEVMBRS(TIME, @DESCENDANTS(@CURRMBR(TIME)))For now, I'm using IF's, i.e., IF Qtr1, Average the range of days 1-90, IF Qtr2, averager the range of days 91-120, etc. Just wondering if there's another way to do it.Thanks in Advance!!

Your question wasn't very clear, but if you only want to sort
them by the count in descending order, just ORDER BY 1 DESC.
<cfquery name="GetEventCount"
datasource="JasperCountyDB">
SELECT COUNT(AG_ID) as EventCount, TYCOD, TYP_ENG, CURENT
FROM aeven
WHERE AG_ID = '#Session.InquiryAgencyCode#'
AND CURENT = 'T'
AND CDTS LIKE '#EventReportDate#'
GROUP BY AG_ID, TYCOD, TYP_ENG, CURENT
ORDER BY 1 DESC
</cfquery>
Phil

Similar Messages

  • General Average question

    I need to create 3 different calculations based on one single measure.
    I have a Fact table containing the measure and two dimensions (time and category).
    It would be something like:
    1 - The average for the current month (AVG);
    2 - YTD average;
    3 - and the running average, for all the entries for each category.
    I have a dashboard prompt with year and month filters. Once the end user makes his selection, the request must display:
    1- Current Month AVG, based on filters;
    2- YTD AVG, based on filters;
    3- Running AVG, NOT based on filters.
    My question is about the running AVG. I've tried the MAVG function, but it doesn't apply to the request needs. Also, since there are filters for the request, I'd not know about the integer I should use in the formula (MAVG, MEASURE, INTEGER).
    Any Ideas of what should I do to have this measure calculated?! I'm considering change the ETL interface and calculate it in a plain cell, but first I need to know if I can have it resolved in the OBIEE Admin Tool.
    Thanks in Advance!

    But what is the difference between average exchange rate, buying rate and selling exchange rate.
    Does system has a way to calculate those exchange rate if we specifiy the exchange rate type or we have to input the figures in SPRO tables in that exchange rate type ?
    Regards,
    Rajesh.

  • Tomcat 5.0.* global JNDI database connect pooling. complex config question

    Ok. I can't get global connection pooling to work in tomcat 5.0.24. (I am running windows xp pro)
    I am using MySQL (installed on the same machine) and I have succesfully worked through the tutorial titled "MySQL DBCP Example" found at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
    This example does not demonstrate global connection pooling, however. I want to share a single connection pool across all my web applications. I don't want a different connection pool for each webapp.
    So I define the connection pool JDBC resource in the conf/server.xml file under the <GlobalNamingResources> element.
    Here is the entire <GlobalNamingResources> element lifted from conf/server.xml:
    (Please overlook some of the formatting mistakes due to the <code> tag interpreting the xml as java.)
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
        <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
        <Resource name="UserDatabase"
                  auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved">
        </Resource>
        <Resource name="jdbc/MySQL"
                  auth="Container"
                  type="javax.sql.DataSource"/>
        <ResourceParams name="UserDatabase">
            <parameter>
                <name>factory</name>
                <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
            </parameter>
            <parameter>
                <name>pathname</name>
                <value>conf/tomcat-users.xml</value>
            </parameter>
        </ResourceParams>
        <ResourceParams name="jdbc/MySQL">
            <parameter>
                <name>factory</name>
                <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
            </parameter>
            <parameter>
                <name>maxActive</name>
                <value>100</value>
            </parameter>
            <parameter>
                <name>maxIdle</name>
                <value>30</value>
            </parameter>
            <parameter>
                <name>maxWait</name>
                <value>20000</value>
            </parameter>
            <parameter>
               <name>username</name>
               <value>webapp</value>
            </parameter>
            <parameter>
               <name>password</name>
               <value>******</value>
            </parameter>
            <parameter>
                <name>removeAbandoned</name>
                <value>true</value>
            </parameter>
            <parameter>
                <name>removeAbandonedTimeout</name>
                <value>3000</value>
            </parameter>
            <parameter>
                <name>logAbandoned</name>
                <value>true</value>
            </parameter>
            <parameter>
                <name>url</name>
                <value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
            </parameter>
        </ResourceParams>
      </GlobalNamingResources>I am still trying to get the DBTest example (described in the link to the tomcat 5 docs above) to work, only now I want it to work using a global connection pool. So here is the contents of webapps/DBTest/WEB-INF/web.xml: (again, please overlook formatting difficulties :)
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
             http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
             version="2.4">
      <description>MySQL Test App</description>
      <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>jdbc/MySQL</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>
    </web-app>The last thing I need to do, I think, is to include a <resourceLink> element in the context.xml file for this webapp. Now in tomcat 5.0.* it is not recommended that the <context> element appear in the conf/server.xml file. Instead, as I understand it, it should appear in either of the two following places (for a webapp called DBTest):
    $CATALINA_HOME/conf/[engine_name]/[host_name]/DBTest.xml
    $CATALINA_HOME/webapps/DBTest/META-INF/context.xmlSince I would eventually like to package each webapp in its own war file, I prefer the second option above. This will enable me to place the context.xml file within the .war file. Currently, however, I am not using .war files.
    For the DBTest webapp I have the following <context> element in webapps/DBTest/META-INF/context.xml:
    <context path="/DBTest" docBase="/DBTest" debug="1">
        <ResourceLink global="jdbc/MySQL" name="jdbc/MySQL" type="javax.sql.DataSource" />
    </context>Now, when I point my browser to http://localhost:8080/DBTest/test.jsp I get the following message:
    javax.servlet.ServletException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver"
    For those who are interested, here is test.jsp:
    <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <sql:query var="rs" dataSource="jdbc/MySQL">
    select id, foo, bar from javatest.testdata
    </sql:query>
    <html>
      <head>
        <title>DB Test</title>
      </head>
      <body>
      <h2>Results</h2>
    <c:forEach var="row" items="${rs.rows}">
        Foo ${row.foo}<br/>
        Bar ${row.bar}<br/>
    </c:forEach>
      </body>
    </html>Now I know that this is a very long and detailed question and that it is unlikely that anyone is even going to read down this far, let alone take the time to study all that XML, but if anyone is able to tell me why this setup does not allow global connection pooling, I will be pretty *@&$**% impressed. I only wish I had duke dollars to give.
    Jon

    Okay, I went back and double checked that I can get the DBTest example working. It is described here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
    I was not able to get it working exactly according to the tutorial, though. I was required to put the <context> element not in the conf/server.xml but in conf/Catalina/localhost/DBTest.xml. Then, with the DBTest/WEB-INF/web.xml as above, I was able to get the DBTest example working. The output of test.jsp (described above also) is the following:
    Results
    Foo hello
    Bar 12345I would like to be able to put the <context> element in webapps/DBTest/META-INF/context.xml (as I think should be allowed) because then I would be able to include it in a war file that encompassed the entire web application. If I am forced to put the <context> element in a subdirectory of the conf directory, then I cannot include it in a war file and I will be unable to just drop my war files in the webapps directory and go. Instead I will have to drop my war files in the webapps directory, then go and fiddle around with the xml files in conf/Catalina/localhost/
    But if I move the <context> element into webapps/DBTest/META-INF/context.xml then the example stops working. When I put it back in conf/Catalina/localhost/DBTest.xml everything is fine again.
    Ok, no big deal. I guess my war file deployment will just have to be a little more complicated.
    But what if I want the resource to be global??? If I remove the <Resource> and <ResourceParams> elements from the webapp-specific <context> element and put them in the <GlobalNamingResource> element in the conf/server.xml file I should have a global resource, right? I did this, then added a resource link to the <context> element (see above), however, the example stops working. I have tried both with and without the <resource-ref> element in web.xml.
    Can some remarkably intelligent and knowledgeable person please explain to me how global resources work in tomcat 5.0, especially global JDBC connection pooling.
    Thanks,
    Jon

  • Really, Really, REALLY complex Tween Question

    Ok, this is the BIG one: I have a motion tween, moving a single graphic forward & backward on an even plane, comprised of six keyframes. I built this animation about a year ago. Now I want to add a keyframe thirty frames after the last keyframe in the timeline for this tween, and I want to position the graphic being animated so that on that last keyframe, it is positioned off the screen to the right. So I put in my new keyframe, put the playhead on that keyframe, then click & drag the symbol off to the right of the stage. That should do it, right? All the other keyframes should be holding their positions with the symbol where it was before on those keyframes, right. But they aren't. They've all moved proportionately to the position of the new keyframe I put in, thirty frames farther along the timeline. I've been pulling my hair out for 45 minutes, trying everything available in this interface (yes, including the roving keyframes toggle), and CANNOT find whatever it takes to have those earlier keyframes hold the symbol in the previous positions when I try and add another animation segment to the path.
    Seems like having the symbols stay in position with previous keyframes would be the default, doesn't it? Any ideas on how to add a new keyframe, move the symbol on the stage to a new position on that new keyframe, and have all the other keyframes hold their positions?
    Pretty complex, huh? Shouldn't be, should it?
    Thanks.
    Cayce

    I have no experience with them, but what you describe wanting would work with the Classic version.
    If you don't want to switch to them, then you could always have a new layer for the new sequence so that you can be sure the other is not going to influence it.

  • Complex Update Question

    I have 2 tables a and b. Both tables have columns have the same primary keys. How would I go about updating a subset of the rows of column a from a column in column b?
    Update (select * from a inner join b on a.id b.id where b.some_column=some_value)
    set a.some_other_column=b.some_other_column
    where a.some_other_column_2=some_other_value;
    Problem is, this statement is not a valid SQL Statement. Could anyone help me please?
    I hope the question is clear....

    I think the SELECT * is fine, at least, it works with a straight select. Although, it is bad practice to do that. You do need to have an operator of some kind in the join condition. Something like:
    UPDATE (SELECT *
            FROM a INNER JOIN b ON a.id = b.id
            WHERE b.some_column=some_value)
    SET a.some_other_column = b.some_other_column
    WHERE a.some_other_column_2 = some_other_value;TTFN
    John

  • Complex Query Question

    I am doing a 9-1-1 reporting system. I am selecting calls by
    Agency and type of call for a given month. That works fine, but I
    need them printed in desending sequence by number call far a call
    type. Don't see anyway to accomplish that with one query.
    Is that a way? If not, the second part of this question is
    that I have not created a table using SQL. I need 3 fields, Field_A
    is Text (9 positions); Field_B is Text (40 Positions) and the last
    is my summarized count from the query. How do I create a Table to
    support this function?
    Query
    <cfquery name="GetEventCount"
    datasource="JasperCountyDB">
    select count(AG_ID) as EventCount, TYCOD, TYP_ENG, CURENT
    from aeven
    where ((AG_ID = '#Session.InquiryAgencyCode#')
    AND (CURENT = 'T') AND (CDTS LIKE '#EventReportDate#'))
    group by AG_ID, TYCOD, TYP_ENG, CURENT
    </cfquery>
    Thanks for any guideance that you can provide.
    Ron

    Your question wasn't very clear, but if you only want to sort
    them by the count in descending order, just ORDER BY 1 DESC.
    <cfquery name="GetEventCount"
    datasource="JasperCountyDB">
    SELECT COUNT(AG_ID) as EventCount, TYCOD, TYP_ENG, CURENT
    FROM aeven
    WHERE AG_ID = '#Session.InquiryAgencyCode#'
    AND CURENT = 'T'
    AND CDTS LIKE '#EventReportDate#'
    GROUP BY AG_ID, TYCOD, TYP_ENG, CURENT
    ORDER BY 1 DESC
    </cfquery>
    Phil

  • Complex Query Question(s)

    I have two tables; one where I am defining questions and
    possible answers and another where you insert the answers. The
    table of questions is called 'public_survey', and SURVEY_ID is the
    primary key.
    The table of answers is called 'public_surveydata', where
    SURVEYDATA_ID is the primary key, SURVEYDATA_QUESTIONID is what
    links the primary key to public_survey and SURVEYDATA_CONTENTID is
    what is needed for output; the other columns are the answers.
    I need to:
    (a) output public_survey so it displays in a searchable
    manner;
    (b) using variables from the search I need to search
    public_surveydata and pull SURVEYDATA_CONTENTID.
    Now comes the part I cannot figure out; I search and I can
    pull up all the contentids that are related to each question; but I
    cannot figure out to only pull results that are shared over all
    returns. My query is a mess; somehow I need to either combine the
    query or run another query after the fact that only pulls common
    ids.
    How do I output only common contentid that are shared in all
    the queries?
    To see all the code and cfdumps in regards to this post go to
    this page:
    http://208.106.208.43/data/query.cfm
    To see the page in action sans cfdump and code go to this
    page:
    http://208.106.208.43/data/
    Thanks!

    Thanks Phil; I'm beginning to think I need to redesign it as
    well. Basically my reasoning for the tables was that I wanted a
    table where I could dynamically add questions that would display a
    y/n, dropdown or checkbox answer - this in turn is linked to
    another table (posts) by the contentid (see
    http://208.106.208.43/data/query.cfm
    The idea is to have a dynamic database feature that I could
    change on the fly; for example -- if another question is to be
    added to the post (i.e. Region) then I can quickly add it to all
    data using a query without having to actually touch the database.
    This is the form that creates these questions:
    http://208.106.208.43/data/survey.cfm
    However... that said - I know the easiest way to fix it would
    be to just pull these columns out and stick them in the content
    table; however that doesn't allow me to set up a dynamic table
    where I can quickly change the questions.
    How would you write a dynamic databases where you can quickly
    insert fields and link them to other tables?

  • Complex mapping question (aggregate)

    Hello all,
    For example, i have a xml structure in input :
    <XML Input Structure>
    <Line1>
    <Country> Fr </country>
    <Currency> EUR <Currency>
    <Town> Paris </Town>
    <MT> 10 </MT>
    </Line1>
    <Line2>
    <Country> Fr </country>
    <Currency> EUR <Currency>
    <Town> Paris </Town>
    <MT> 10 </MT>
    </Line2>
    <Line3>
    <Country> USA</country>
    <Currency> DOL <Currency>
    <Town> Chicago </Town>
    <MT> 20 </MT>
    </Line3>
    <Line4>
    <Country> USA</country>
    <Currency> DOL <Currency>
    <Town> Detroit </Town>
    <MT> 20</MT>
    </Line4>
    </XML Input Structure>
    In output, i want to aggregate the field "MT" only  when fields "Country, Currency and Town" are the same in order to have something like that :
    <XML Output Structure>
    <Line1>
    <Country> Fr </country>
    <Currency> EUR <Currency>
    <Town> Paris </Town>
    <MT> 20 </MT>
    </Line1>
    <Line2>
    <Country> USA</country>
    <Currency> DOL <Currency>
    <Town> Chicago </Town>
    <MT> 20 </MT>
    </Line2>
    <Line3>
    <Country> USA</country>
    <Currency> DOL <Currency>
    <Town> Detroit </Town>
    <MT> 20 </MT>
    </Line3>
    </XML Output Structure>
    I am not a specialist in java so i would like to knowi if it's possible to do it with node standard functions ? if not, what is the best solution : XSLT, Java mapping, UDF ?
    Thanks by advance,
    JP
    Edited by: Jean-Philippe PAIN on Dec 16, 2008 12:14 PM

    hi,
    with standard it would be pretty hard
    but with a simple UDF (with 4 inputs) you can aggregate
    and output it quite easily
    try with a udf if you don't want to go for java mapping
    Regards,
    Michal Krawczyk
    http://mypigenie.com XI/PI FAQ

  • Complex Mapping Question

    Hi,
    i have a xml structur like that:
    <root>
         <header>
              <nr>00010</nr>
         </header>
         <header>
              <nr>00102</nr>
         </header>
         <item>
              <nr>00010</nr>
              <value>20</value>
              <wight>60</wight>
         </item>
         <item>
              <nr>00102</nr>
              <value>30</value>
              <wight>30</wight>
         </item>
         <desc>
              <nr>00010</nr>
              <name>Meet</name>
         </desc>
         <desc>
              <nr>00102</nr>
              <name>Apple</name>
         </desc>
    </root>
    and want that it looks like that:
    <root>
         <item>
              <nr>00010</nr>
              <name>Meet</name>
              <value>20</value>
              <wight>60</wight>
         </item>
         <item>
              <nr>00102</nr>
              <name>Apple</name>
              <value>30</value>
              <wight>30</wight>
         </item>
    </root>
    for each header tag in source message it must be a item tag in target message.
    can i handle this with a XSLT Mapping ?
    any Idea?
    for me its looks very difficult to do that in a mapping.
    Regards,
    Robin

    I think you have your source xml wrong. Try getting your source xml structure to be something like below, the reason being you cannot do a loop (for-each) otherwise.
    <?xml version="1.0" encoding="UTF-8" ?>
    <root>
    <data>
    <header>
    <nr>00010</nr>
    </header>
    <item>
    <nr>00010</nr>
    <value>20</value>
    <wight>60</wight>
    </item>
    <desc>
    <nr>00010</nr>
    <name>Meet</name>
    </desc>
    </data>
    <data>
    <header>
    <nr>00102</nr>
    </header>
    <item>
    <nr>00102</nr>
    <value>30</value>
    <wight>30</wight>
    </item>
    <desc>
    <nr>00102</nr>
    <name>Apple</name>
    </desc>
    </data>
    <data>
    <header>
    <nr>00102</nr>
    </header>
    <item>
    <nr>00102</nr>
    <value>30</value>
    <wight>40</wight>
    </item>
    <desc>
    <nr>00102</nr>
    <name>Apple</name>
    </desc>
    </data>
    </root>
    Now if understood your requirement correctly, you need to club all nr together, and also aggregate (sum) their respective values and wight.
    The XSLT to achieve that is as follows,
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:key name="nr" match="root/data" use="header/nr"/>
    <xsl:template match="/">
    <root>
    <!-- iterate on each group -->
    <xsl:for-each select="root/data[generate-id(.) = generate-id(key('nr', header/nr)[1]) ]">
    <xsl:variable name="group" select="key('nr', header/nr)"/>
    <xsl:variable name="nr">
    <xsl:value-of select="header/nr"/>
    </xsl:variable>
    <xsl:variable name="name">
    <xsl:value-of select="desc/name"/>
    </xsl:variable>
    <xsl:variable name="value">
    <xsl:value-of select="sum($group/item/value)"/>
    </xsl:variable>
    <xsl:variable name="wight">
    <xsl:value-of select="sum($group/item/wight)"/>
    </xsl:variable>
    <!-- Generate the final XML file -->
    <item>
    <nr>
    <xsl:value-of select="$nr"/>
    </nr>
    <name>
    <xsl:value-of select="$name"/>
    </name>
    <value>
    <xsl:value-of select="$value"/>
    </value>
    <wight>
    <xsl:value-of select="$wight"/>
    </wight>
    </item>
    </xsl:for-each>
    </root>
    </xsl:template>
    </xsl:stylesheet>
    Please have a look at my code sample that i have submitted, which speaks of how to handle such a scenario.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/generic xslt mapping in sap xi, part i.pdf
    cheers
    Sameer

  • A slightly complex date question

    Hello,
    I have a series of date ranges, for example:
    08/02/2008-08/04/2008
    07/06/2007-07/10/2007
    06/05/2006-06/12/2006
    The user enters another set of dates:
    08/01/2008-08/04/2008
    I need to make sure that the range of dates they enter do not
    overlap with any of the dates mentioned above. The one that the
    user entered would conflict with (1) above and should return an
    error.
    If they enter another date like:
    01/01/1999-02/15/2009
    This should also return an error because this date conflicts
    with ALL of the date ranges above. I would appreciate any help on
    this issue.

    quote:
    Originally posted by:
    paross1
    Wouldn't changing LTE and GTE to LT and GT take care of your
    "problem"?
    Phil
    No:
    I need to check for date overlaps.
    08/14/2008-08/20/2008
    And I enter 08/15/2008-8/17/2008, this should yield false,
    because this date range has dates that overlap. If I enter
    02/07/2007-02/09/2009, it should also yield false, and so should
    08/13/2008-08/15/2008, and 08/17/2008-08/22/2008.
    All of them are invalid dates and should not be allowed.
    Maybe I am explaining the issue improperly. Basically, no
    single day within the range I enter should overlap with any single
    day within the existing date range.

  • Complex Masking question

    Hello,
    This may be rather difficult to explain but, I'll do my best. ( I have attached an image to better help explain my challenge)
    I am trying to make a 3d hologram effect,  I have ran into an issue with my masks. I am trying to create a shape, that appears to be on top of another shape, but still retain the transparency and the illusion that a mask is hiding the element below it. When I animate the shapes,  I would like the mask to continue to mask the shape below it.The problem that I am runnung into  is that I can't seem to retain the proper masking of my shapes when I animate the objects.
    Below is an image of the desired effect I would like to achieve.
    I think need a little bit of help setting up a mask for this effect.
    Thanks in advance guys!

    The conundrum can be solved withe the use of a track matte.  Make a cicle shape or circle wipe on a solid.  Scale it to match the size of the existing circle, and parent it to the existing circle..  Use it as an Alpha Matte for the square.  It needs to be on the layer directly above the square.

  • Complex Tag Question?

    I want to write a BodyTag that will contain both HTML and other JSP tags. I want the JSP tags within this tag to handle themselves and have the HTML stuff simply pass through.
    For example:
    <@% taglib uri="/WEB-INF/cc.tld" prefix="cc" %>
    <cc:form action="/servlet/ProcessRequestServlet">
        <table>
            <tr>
                <td>Name: </td><td><cc:text id="name" size="20"/></td>
            </tr>
        </table>
    <input type="submit" value="Submit"/>
    </cc:form>In this example the custom form tag would render an HTML form tag and some hidden HTML elements. I would then want the table, tr, td tags etc. to pass through as they are. The custom text tag would render a specific input HTML tag, the submit button would passthrough and the closing custom form tag would close the form.
    Is is possible to do this? I've had success doing BodyTags where all the enclosed content was JSP or all enclosed content was passthrough HTML.
    Thanks in advance.

    Well it's not default behaviour from what I've seen in the past: Available options are:
    1. Empty - there can be no body.
    2. JSP - all content runs through the JSP compiler. Non-jsp content is ignored. At least that's what I get in my tags.
    3. Tagdependent - all content is handled through the tag handler.
    I need to be able to use the tags nested inside my new form tags to be usable outside a custom form tag. That's why I have them totally responsible for themselves. But when within a custom form tag, I need to be able to provide some standard html (basically table and related tags) mixed with the JSP tags.
    If this is a situation where my tag is supposed to capture all body content and then determine itself whether it's JSP or HTML, I'd be glad to know how to do that as well. Meaning what do I do if I come across HTML, just pass it to the response stream? Then when I encounter a custom tag how do I forward that to the JSP compiler?
    Any help would be appreciated.
    I may be re-inventing the wheel, but the kinds of things I'm trying to do are pretty simple and don't require all the other STRUTS overhead. I am that Java programmer that spent years using Notepad and the javac command line compiler before finally switching to an IDE. If I was going to go to a complete framework like struts, I'd probably choose Tapestry or even make the jump to JSF.

  • Complex syncing question

    I want to do the following, without having to change the settings on my iPod every time I plug it in . . .
    1 - have it automatically sync on my home iMac
    2 - have it act only as a hard drive on all other Macs, so I can use it as a handy portable drive
    It doesn't seem as though this would be hard to do, but as far as I can tell, I can only have it one way or the other. If I have the iPod set to sync, it will immediately sync on any computer I plug it into, wiping out the extensive music collection from my home iMac. If I set it to manual, then I have to change it to sync, and then back again, every time I plug into my home iMac.
    Am I missing something???
    Reina Pennington, PhD
    <Edited by Moderator>

    The iPod will only want to automatically sync with it's home library (which happens to be your home iMac). If you connect it to another computer (inc. Windows PC's if the drive is still in Windows format) what happens depends on whether iTunes is installed. If iTunes is not present the iPod should just appear as a regular external drive. If iTunes is there then, depending on the options set, the iPod will just connect as a drive, iTunes will launch but not try to sync the device. or iTunes will launch and offer to sync the device. Say no and you can quit itunes & use the iPod as an external drive. FWIW I set my iTunes to not launch on connection and disable all automatic syncing. You can also switch from auto sync, to manual and back to auto sync without iTunes wiping existing content that appears in your auto sync list.
    tt2

  • Complex Query Question-ADF/JSP/10g

    I have a query in a VO that I'm programmatically creating the where clause for that has been working fine.
    I need to extend the functionality to include other tables. I had thought that adding a union to my programmatically generated SQL would work, but it fails at execution. Apparently the environment adds a "select count(1) from(" to the front of my query to generate a row output count, and then closes the parenthesis in the wrong place, which causes the query to fail with an "ORA-00933 SQL command not properly ended".
    How can I accomplish this? I've looked at creating a new VO which includes multiple tables, but what I really need is a union of output from the single primary table with multiple from and where that are dynamically generated based upon user input.

    Here is the logging output when it throws the exception:
    04/08/05 09:16:14 [497] Reusing a cached session application module instance
    04/08/05 09:16:14 [498] Getting a connection for internal use...
    04/08/05 09:16:14 [499] Creating internal connection...
    04/08/05 09:16:14 [500] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    04/08/05 09:16:14 [501] DCUtil.findSpelObject - Tokenizer : searchMasterNamesUIModel
    04/08/05 09:16:14 [502] DCUtil.RETURNING oracle.jbo.uicli.binding.JUFormBinding
    04/08/05 09:16:14 [503] **** refreshControl() for BindingContainer :searchMasterNamesUIModel
    04/08/05 09:16:14 [504] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    04/08/05 09:16:14 [505] **** refreshControl() for BindingContainer :searchMasterNamesUIModel
    04/08/05 09:16:14 [506] Changing iterator range size from :20 to :10
    04/08/05 09:16:14 [507] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    04/08/05 09:16:14 [508] [RangeRefreshEvent: MasterNamesView1 start=0 count=0]
    04/08/05 09:16:14 [509] SELECT MasterNames1.MNI, to_char(date_of_birth,'MM/DD/YYYY') AS DOB, MasterNames1.LAST_NAME, MasterNames1.EYE_COLOR, MasterNames1.HAIR_COLOR, MasterNames1.MIDDLE_NAME, MasterNames1.DATE_OF_BIRTH, MasterNames1.HEIGHT, MasterNames1.SUFFIX, MasterNames1.FIRST_NAME, MasterNames1.WEIGHT, MasterNames1.USER_INSERTED, MasterNames1.DATE_INSERTED, MasterNames1.SKIN_TONE, MasterNames1.LANGUAGE, MasterNames1.OCCUPATION, MasterNames1.PLACE_OF_BUSINESS, MasterNames1.E_MAIL_ADDRESS, MasterNames1.DATE_MODIFIED, MasterNames1.USER_MODIFIED, MasterNames1.ETHNICITY, MasterNames1.RACE, MasterNames1.MARITAL_STATUS, MasterNames1.SEX, MasterNames1.OFFENDER_COMMENTS, Last_Name||', '||First_Name AS FULLNAME FROM MASTER_NAMES MasterNames1 WHERE (upper(last_name) = 'SMITH' and upper(first_name) like '%') union all select MasterNames1.MNI, to_char(date_of_birth,'MM/DD/YYYY') AS DOB, MasterNames1.LAST_NAME, MasterNames1.EYE_COLOR, MasterNames1.HAIR_COLOR, MasterNames1.MIDDLE_NAME, MasterNames1.DATE_OF_BIRTH, MasterNames1.HEIGHT, MasterNames1.SUFFIX, MasterNames1.FIRST_NAME, MasterNames1.WEIGHT, MasterNames1.USER_INSERTED, MasterNames1.DATE_INSERTED, MasterNames1.SKIN_TONE, MasterNames1.LANGUAGE, MasterNames1.OCCUPATION, MasterNames1.PLACE_OF_BUSINESS, MasterNames1.E_MAIL_ADDRESS, MasterNames1.DATE_MODIFIED, MasterNames1.USER_MODIFIED, MasterNames1.ETHNICITY, MasterNames1.RACE, MasterNames1.MARITAL_STATUS, MasterNames1.SEX, MasterNames1.OFFENDER_COMMENTS, Last_Name||', '||First_Name AS FULLNAME FROM MASTER_NAMES MasterNames1 where mni in (select mni from pointer.aliases where upper(last_name) = 'SMITH' and upper(first_name) like '%')
    04/08/05 09:16:14 [510] ViewObject: MasterNamesView1 Estimated Row Count Query Statement:
    04/08/05 09:16:14 [511] "SELECT count(1) FROM (SELECT MasterNames1.MNI, to_char(date_of_birth,'MM/DD/YYYY') AS DOB, MasterNames1.LAST_NAME, MasterNames1.EYE_COLOR, MasterNames1.HAIR_COLOR, MasterNames1.MIDDLE_NAME, MasterNames1.DATE_OF_BIRTH, MasterNames1.HEIGHT, MasterNames1.SUFFIX, MasterNames1.FIRST_NAME, MasterNames1.WEIGHT, MasterNames1.USER_INSERTED, MasterNames1.DATE_INSERTED, MasterNames1.SKIN_TONE, MasterNames1.LANGUAGE, MasterNames1.OCCUPATION, MasterNames1.PLACE_OF_BUSINESS, MasterNames1.E_MAIL_ADDRESS, MasterNames1.DATE_MODIFIED, MasterNames1.USER_MODIFIED, MasterNames1.ETHNICITY, MasterNames1.RACE, MasterNames1.MARITAL_STATUS, MasterNames1.SEX, MasterNames1.OFFENDER_COMMENTS, Last_Name||', '||First_Name AS FULLNAME FROM MASTER_NAMES MasterNames1 WHERE (upper(last_name) = 'SMITH' and upper(first_name) like '%') union all select MasterNames1.MNI, to_char(date_of_birth,'MM/DD/YYYY') AS DOB, MasterNames1.LAST_NAME, MasterNames1.EYE_COLOR, MasterNames1.HAIR_COLOR, MasterNames1.MIDDLE_NAME, MasterNames1.DATE_OF_BIRTH, MasterNames1.HEIGHT, MasterNames1.SUFFIX, MasterNames1.FIRST_NAME, MasterNames1.WEIGHT, MasterNames1.USER_INSERTED, MasterNames1.DATE_INSERTED, MasterNames1.SKIN_TONE, MasterNames1.LANGUAGE, MasterNames1.OCCUPATION, MasterNames1.PLACE_OF_BUSINESS, MasterNames1.E_MAIL_ADDRESS, MasterNames1.DATE_MODIFIED, MasterNames1.USER_MODIFIED, MasterNames1.ETHNICITY, MasterNames1.RACE, MasterNames1.MARITAL_STATUS, MasterNames1.SEX, MasterNames1.OFFENDER_COMMENTS, Last_Name||', '||First_Name AS FULLNAME FROM MASTER_NAMES MasterNames1 where mni in (select mni from pointer.aliases where upper(last_name) = 'SMITH' and upper(first_name) like '%')) "
    04/08/05 09:16:14 [512] ViewObject: MasterNamesView1 Estimated Row Count: 5
    04/08/05 09:16:14 [513] DCBindingContainer.reportException :oracle.jbo.RowNotAvailableException
    04/08/05 09:16:14 [514] oracle.jbo.RowNotAvailableException: JBO-25046: Requested row not available in row set iterator MasterNamesView1.
         at oracle.jbo.client.remote.RowSetIteratorImpl.getAllRowsInRange(RowSetIteratorImpl.java:2002)
         at oracle.jbo.client.remote.RowSetImpl.getAllRowsInRange(RowSetImpl.java:729)
         at oracle.jbo.client.remote.ViewUsageImpl.getAllRowsInRange(ViewUsageImpl.java:1069)
         at oracle.jbo.common.ws.WSRowSetIteratorBase.getAllRowsInRange(WSRowSetIteratorBase.java:746)
         at oracle.adf.model.binding.DCIteratorBinding.getAllRowsInRange(DCIteratorBinding.java:1523)
         at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:533)
         at oracle.adf.model.binding.DCBindingContainer.refreshControl(DCBindingContainer.java:1580)
         at oracle.adf.controller.lifecycle.PageLifecycle.refreshModel(PageLifecycle.java:677)
         at oracle.adf.controller.struts.actions.DataAction.refreshModel(DataAction.java:374)
         at oracle.adf.controller.struts.actions.DataAction.refreshModel(DataAction.java:563)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:128)
         at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:233)
         at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:163)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    04/08/05 09:16:14 [515] DCUtil.findSpelObject - Tokenizer : SearchMNUIModel
    04/08/05 09:16:14 [516] DCUtil.RETURNING oracle.jbo.uicli.binding.JUFormBinding
    04/08/05 09:16:14 [517] **** refreshControl() for BindingContainer :SearchMNUIModel
    04/08/05 09:16:14 [518] Column count: 29
    04/08/05 09:16:14 [519] ViewObject: MasterNamesView1 close prepared statements...
    04/08/05 09:16:14 [520] ViewObject: MasterNamesView1 Created new QUERY statement
    04/08/05 09:16:14 [521] SELECT MasterNames1.MNI, to_char(date_of_birth,'MM/DD/YYYY') AS DOB, MasterNames1.LAST_NAME, MasterNames1.EYE_COLOR, MasterNames1.HAIR_COLOR, MasterNames1.MIDDLE_NAME, MasterNames1.DATE_OF_BIRTH, MasterNames1.HEIGHT, MasterNames1.SUFFIX, MasterNames1.FIRST_NAME, MasterNames1.WEIGHT, MasterNames1.USER_INSERTED, MasterNames1.DATE_INSERTED, MasterNames1.SKIN_TONE, MasterNames1.LANGUAGE, MasterNames1.OCCUPATION, MasterNames1.PLACE_OF_BUSINESS, MasterNames1.E_MAIL_ADDRESS, MasterNames1.DATE_MODIFIED, MasterNames1.USER_MODIFIED, MasterNames1.ETHNICITY, MasterNames1.RACE, MasterNames1.MARITAL_STATUS, MasterNames1.SEX, MasterNames1.OFFENDER_COMMENTS, Last_Name||', '||First_Name AS FULLNAME FROM MASTER_NAMES MasterNames1 WHERE (upper(last_name) = 'SMITH' and upper(first_name) like '%') union all select MasterNames1.MNI, to_char(date_of_birth,'MM/DD/YYYY') AS DOB, MasterNames1.LAST_NAME, MasterNames1.EYE_COLOR, MasterNames1.HAIR_COLOR, MasterNames1.MIDDLE_NAME, MasterNames1.DATE_OF_BIRTH, MasterNames1.HEIGHT, MasterNames1.SUFFIX, MasterNames1.FIRST_NAME, MasterNames1.WEIGHT, MasterNames1.USER_INSERTED, MasterNames1.DATE_INSERTED, MasterNames1.SKIN_TONE, MasterNames1.LANGUAGE, MasterNames1.OCCUPATION, MasterNames1.PLACE_OF_BUSINESS, MasterNames1.E_MAIL_ADDRESS, MasterNames1.DATE_MODIFIED, MasterNames1.USER_MODIFIED, MasterNames1.ETHNICITY, MasterNames1.RACE, MasterNames1.MARITAL_STATUS, MasterNames1.SEX, MasterNames1.OFFENDER_COMMENTS, Last_Name||', '||First_Name AS FULLNAME FROM MASTER_NAMES MasterNames1 where mni in (select mni from pointer.aliases where upper(last_name) = 'SMITH' and upper(first_name) like '%') ORDER BY fullname
    04/08/05 09:16:14 [522] Bind params for ViewObject: MasterNamesView1
    04/08/05 09:16:14 [523] [RangeRefreshEvent: MasterNamesView1 start=0 count=5]
    04/08/05 09:16:14 [524] A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'*** DCDataControl.sync() called from :somestring
    04/08/05 09:16:14 [525] **** refreshControl() for BindingContainer :SearchMNUIModel
    04/08/05 09:16:14 [526] DCUtil.findSpelObject - Tokenizer : showMasterNamesUIModel
    04/08/05 09:16:14 [527] DCUtil.RETURNING oracle.jbo.uicli.binding.JUFormBinding
    04/08/05 09:16:14 [528] **** refreshControl() for BindingContainer :showMasterNamesUIModel
    04/08/05 09:16:14 [529] Changing iterator range size from :10 to :20
    04/08/05 09:16:14 [530] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    04/08/05 09:16:14 [531] [RangeRefreshEvent: MasterNamesView1 start=0 count=5]
    04/08/05 09:16:14 [532] A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'**** refreshControl() for BindingContainer :showMasterNamesUIModel
    04/08/05 09:16:14 [533] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    04/08/05 09:16:14 [534] A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'Warning! Using introspection to lookup and return value for :Find
    04/08/05 09:16:14 [535] A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'A formatting exception occured: DateOfBirthJBO-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg=Illegal pattern character 'Y'Application Module failover is enabled
    04/08/05 09:16:14 [536] Getting a connection for internal use...
    04/08/05 09:16:14 [537] Creating internal connection...
    04/08/05 09:16:14 [538] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    04/08/05 09:16:14 [539] <AM MomVer="0">
    <cd/>
    <TXN Def="1" New="0" Lok="1"/>
    <VO>
    <VO It="1" Sz="20" St="0" Ex="1" Def="model.MasterNamesView" Name="MasterNamesView1" cli="1">
    <Wh>
    <![CDATA[upper(last_name) = 'SMITH' and upper(first_name) like '%') union all select MasterNames1.MNI, to_char(date_of_birth,'MM/DD/YYYY') AS DOB, MasterNames1.LAST_NAME, MasterNames1.EYE_COLOR, MasterNames1.HAIR_COLOR, MasterNames1.MIDDLE_NAME, MasterNames1.DATE_OF_BIRTH, MasterNames1.HEIGHT, MasterNames1.SUFFIX, MasterNames1.FIRST_NAME, MasterNames1.WEIGHT, MasterNames1.USER_INSERTED, MasterNames1.DATE_INSERTED, MasterNames1.SKIN_TONE, MasterNames1.LANGUAGE, MasterNames1.OCCUPATION, MasterNames1.PLACE_OF_BUSINESS, MasterNames1.E_MAIL_ADDRESS, MasterNames1.DATE_MODIFIED, MasterNames1.USER_MODIFIED, MasterNames1.ETHNICITY, MasterNames1.RACE, MasterNames1.MARITAL_STATUS, MasterNames1.SEX, MasterNames1.OFFENDER_COMMENTS, Last_Name||', '||First_Name AS FULLNAME FROM MASTER_NAMES MasterNames1 where mni in (select mni from pointer.aliases where upper(last_name) = 'SMITH' and upper(first_name) like '%']]>
    </Wh>
    <Key>
    <![CDATA[000100000003313431]]>
    </Key>
    </VO>
    </VO>
    </AM>
    04/08/05 09:16:14 [540] **insert** id=1, parid=-1, collid=3051, keyArr.len=-1, cont.len=1416
    04/08/05 09:16:14 [541] stmt: begin insert into "PS_TXN" values (:1, :2, :3, empty_blob(), sysdate) returning content into :4; end;
    04/08/05 09:16:14 [542] **commit** #pending ops=1
    04/08/05 09:16:15 [543] Getting a connection for internal use...
    04/08/05 09:16:15 [544] Creating internal connection...
    04/08/05 09:16:15 [545] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    04/08/05 09:16:15 [546] **deleteAll** collid=3050
    04/08/05 09:16:15 [547] stmt: delete "PS_TXN" where collid=:1
    04/08/05 09:16:15 [548] **commit** #pending ops=1
    Interestingly enough, it returns data correctly even if the exception is thrown.

  • Creating an average of a list of only checked cells

    Thank you up front to anyone you can help me out. I'm a numbers newbie. Basically I can't seem to figure out how to write an equation to say " give me an average of a list of numbers in column b only in there are check marks in column a next to the numbers
    This is what i have but it doesn't seem to work.
    =AVERAGE(IF($A$4:$A$13=TRUE,B4:B13))
    I have used this equation in the past to look through a list of expenditures and total up only those rows with Gas listed
    =SUM(IF($A$4:$A$13="GAS",B4:B13))
    But i can't seem to get the equation to reference checkboxes
    any help would be appreciated

    Oops! Forgot about the average question. Let me get back...
    You might be best off using the SUMIF version for TRUE cells then divide by COUNTIF(range,TRUE).
    Regards,
    Message was edited by: WWJD
    Here's the visual:

Maybe you are looking for