Complex Aggregate Aware Problem

I am facing issue with @AA() in following the scenario.
I have a measure with following definition:
m1= @AA(FT1\ftm1,AT1\atm1,AT2\atm2,FT2\ftm2)
Where,
AT1\atm1=@AA(ATA1\atam1,ATA2\atam2)
Similar definition is also applicable for dimensions from AT1
AT1\atd1=@AA(ATA1\atad1,ATA2\atad2)
I have marked the ATA1 and ATA2 incompatible with all the objects derived from FT1 and FT2 and vise verse.
Definition of Dimension object from AT1 is as follows:
atd1= @AA(ATA1\atad1,ATA2\atad2)
There is another dimension table related to all the tables.
FT1->DimA1
FT2->DimA1
ATA1->DimA1
ATA2->DimA1
Now, When I drag dimension DimA1,AT1 and measure m1 it creates 2 queries as:
Q1: select DimA1,ATA2 from DimA1,ATA1
Q2: select DimA1,FT1\ftm1 from DimA1,FT1
Its very tedious but this is the most simplest version in which I can describe...

Hi
Look what I have done:
1) Here is view of my JSF Page and components: http://img695.imageshack.us/img695/4218/21964358.jpg
On the left there is my Data Control for Web Service. The input is simple Integer and the results are many rows (here is result form EM console test: http://img41.imageshack.us/img41/8803/23008039.jpg )
The input value form is made by drag and drop entire execute(Integer) as ADF Parameter Form. The id of execute button is cb1.
The results are made by drag and drop PassDetails as ADF Read Only Table.
2) I did a Create Method Binding For Action for execute button as you suggested. Adding New Bean: [Bean Name - BindingMethod] [Class Name - BindingMethod] [Scope - request]. It was created a java file as seen on this picture - http://img11.imageshack.us/img11/8192/17868604.jpg I've added your code.
3) I've also put Refresh Condition: #{adfFacesContext.initialRender} for PassDetailsIterator - http://img35.imageshack.us/img35/2271/85080775.jpg
Thats all I've done. When running page the ADF Table is not fetching data. When I enter Input Value there are no results in ADF Table, but the instance of my web service is completed.
When I put Refersh Condition #{!adfFacesContext.initialRender} it automatically fetchind data.
What should I change in my application? Please help?
Best regards MK.

Similar Messages

  • Aggregate aware function is failing.

    Hi,
    I have 2 Contexts from which I am retrieving data.
    Context 1:
    In this Context I have Table1(T1), Table2(T2), Table3(T3). Where joins are as follows:
    T1->T2->T3
    Context2:
    In this Context I have Fact table(FT1) where joins are:
    FT1->T2
    I have created a Measure where I have applied Aggregate Aware as follows:
    @Aggregate(T1\m1,FT1\m1)
    Now,
    When I use Dimension created on T3 with this measure it creates 2 queries as follows:
    Q 1: select d1 from T3
    Q 2: select m1from FT1
    Its not getting redirected to measure created on T1.
    We have couple of more contexts similar to above in universe and it works fine with it. However, not sure why its not working in this case.
    Thanks in advance for your help.

    Hi Bona,
    This link will help you
    http://events.asug.com/2011ASBOUC/5004_Implementing_Aggregate_Awareness_in_SAP_BusinessObjects.pdf
    Derived table are created at the universe level.
    1. They are usually created to fetch results from tables using a complex
    logic condition.
    2. To get the Max/ Min date for the data set. Usually used to find the Latest
    Data date or Oldest data date etc.
    3. Its not a good idea to uses them to aggregate data
    Regards
    Mustafa

  • Aggregate aware function

    Hi,
    is it possible to apply aggregate aware funtion to derived table
    Regards,
    Rao

    Hi Bona,
    This link will help you
    http://events.asug.com/2011ASBOUC/5004_Implementing_Aggregate_Awareness_in_SAP_BusinessObjects.pdf
    Derived table are created at the universe level.
    1. They are usually created to fetch results from tables using a complex
    logic condition.
    2. To get the Max/ Min date for the data set. Usually used to find the Latest
    Data date or Oldest data date etc.
    3. Its not a good idea to uses them to aggregate data
    Regards
    Mustafa

  • Complex aggregates through answers

    I have a sales table formatted like
    country_id,product_id,date
    (int,int,date)
    or say, region, district, month in the paint demo
    and I'd like to produce a single variance metric for each country_id/product_id pair based on the user's input of interval. Essentially, I want to group the number of orders by an interval (say, 20 seconds or whatever the user enters) and then do some sort of time series analysis on them (for example take the variance of that grouping)
    If I were doing this in raw SQL I would create a nested query that built up the count of country_id/product_id/( count by date/20 ) and then worked over those values, but I was hoping OBIEE had some mechanism to work over such queries in a more intuitive manner. I can do this in Answers by creating hideously complex aggregates in the column formulas - is there a better way? This seems like a pretty common use case
    thanks

    Could you include a little worked example so its easier to visualise your requirement?

  • Does Information Designer Tools's aggregate awareness function support OLAP

    Hi...
    Does Information Designer Tools's aggregate awareness function support OLAP ??
    Thanks

    To see which ODBC function DG4ODBC is looking for and unixODBC isn't supporting it would be best to get an ODBC trace file. But as your unixODBC driver (unixODBC-2.2.11-10.el5) is outdated and these old drivers had a lot of issues when being used on 64bit operating systems (for example wrong sizeofint etc). So best would be to update the unixODBC Driver manager to release 2.3.x. More details can be found on the web site: www.unicodbc.org
    - Klaus

  • @aggregate aware or Derived Tables  ..

    Hello,
    the original data in my Universe has about 2 Mio. i have 2 questions ..
    is there any reference values for best performance of a universe (e.g 1. Mio rows .. what ever)
    how can i get best performance: @aggregate aware or with derived tables .. (other Alternatives)
    Production DB: Oracle
    BOXIR2 SP 4

    Hi,
    You can get better performance with aggregate awareness, but you need the aggregate tables in the db.
    As a brief overview consider a table prod_cust_order (1million rows)
    Product, Customer, Order Amount
    This could be aggregated to product_order Product, Order Amount (500 rows)
    If the user wants to see order amount by customer then they are going to have to query the original table, but if they are interested in product only they they can go to Product_order table.
    The aggegrate awareness allows you to create a measure object with both tables as the source, and will then select the approriate one when building the query based on the dimension you have selected. So if the user selects customer then it will go to the top prod_cust_order but if they don't it will source it from the much smaller Product_order table. The user does not see the change in WebI unless they look at the underlying SQL.
    Derived tables are not so good for performance as the enter derived query is included in the SQL built.
    Regards
    Alan

  • Aggregate awareness: please help

    HI OBI gurus.
    I dont know what i am missing, but no discussion group giving detailed explanation on how to create aggregate awareness in OBI. i have been trying to figure out this but utterly failing. I know i am dumb but something is missing somewhere please help. Here  I am explaining what i am trying to achieve including examples below. Please help.
    Suresh
    OBI Version: 10.1.3.3
    DB Model
    Area Dim Table,
    Country,
    State
    City
    Fact Tables (3 Fact tables)
    1. Country wise Sales (Country Code, Sum Sales)
    2. State wise Sales (State Code, Sum Sales)
    3. City wise Sales ( City Code, Sum Sales)
    Please let me know how i can join the above tables in physical and bmm to achieve this.
    If i create a report for Country, State Sum Sales. The query should be populated like this.
         select country, state, sum(sales)
            from area_dim, sate_wise_sales_fact fact
         where  area_dim.state_code= fact.state_code
           group by country, state
    If i want to create a report for Country, State, City Sum Sales. The query should be populated like this.
         select country, state, city, sum(sales)
            from area_dim, city_wise_sales_fact fact
         where  area_dim.city_code= fact.city_code
           group by country, state, city
    Should choose different fact tables for different lovel level dim.
    Thanks and Regards
    Suresh

    $ uresh
    You changed UserName from slella to $ uresh!! You want free from Garry and me
    I thought to response to your post, i realized its you and your free
    https://forums.oracle.com/thread/2558637
    Looks like you for got your old post out of 4 answered 2 are from me.. have fun
    ~ cool-bi.com

  • Complex IDOC mapping problem

    Hello,
    I'm stuck with a complex mapping issue that I can't figure out.  I'm trying to pull 0..N Variant Configuration segments from the ORDERS IDOC and map it into a 0..N XML segment.
    The inbound ORDERS IDOC is structured like this:
    IDOC
    ...E1EDP01  (Item segment 0..N)
    ......E1EDP19 (Product data 0..5)
    ...........Z1EDPIT  (Configuration Data 0..N)
    .................ATUE1   (Description)
    .................ZCODE   (Category)
    .................RTWTB  (Value)
    Target XML:
    Order  
    ....Item  (Item segment 0..N)
    .......Product  (Product data 0..1)
    ............VariantConfig  (configuration data 0..N)
    ....................Description
    ....................Category
    .....................Value
    I need to create a new VariantConfig segment in my XML for every Z1EDPIT segment for that PO Item.  But I need to skip any Z1EDPIT segments when ATUE1 = 'OPTIONS' or when ATUE1 does not exist.
    The problem I'm running into is that my mapping is capable of creating the VariantConfig segment under those conditions but the following mappings used to create the Description/Category/Value are unable to skip the Z1EDPIT segments.
    For example:
    IDOC
    ...E1EDP01 
    ......E1EDP19
    ...........Z1EDPIT 
    .................ZCODE     = REQT
    .................RTWTB     =  5644
    ...........Z1EDPIT 
    .................ATUE1     = Finish
    .................ZCODE    = REQT
    .................RTWTB    = 7712
    The output XML should read:
    Order  
    ....Item 
    .......Product 
    ............VariantConfig
    ....................Description   = Finish
    ....................Category      = REQT
    .....................Value          = 7712
    So I determine to create the VariantConfig segment if ATUE1 exists and does not equal 'OPTIONS'.  So my mapping creates one VariantConfig segment because the second Z1EDPIT qualifies.  But each element within that node is reverting back to the first Z1EDPIT segment.
    I thought the top of the Node (VariantConfig) would determine the context for the following fields.  Therefore, when the 2nd Z1EDPIT segment generates the VariantConfig node then the elements should refer to the current context of the root node (VariantConfig).
    What tools does PI's mapping provide to resolve a situation like this? 
    Any suggestions?
    Thanks,
    Matt

    Job,
    Thanks, for the responses!
    What do you mean by "add a context change for the fields". 
    Is there some mapping function to add a context change or is this a UDF I need to write to handle the context changes when ATUE1 is missing or equal to "OPTIONS".
    In my example:
    VariantConfig:
    ATUE1 (E1EDP01) >mapWithDefault [OPTIONS] equatsS [OPTIONS] -> Not ->createIf->VariantConfig
    Sub Element
    Category
    ATUE1 (E1EDP01) >mapWithDefault [OPTIONS] equatsS [OPTIONS] -> Not ->ifWithoutElse>ZCODE->Category
    The problem is that this does not keep the ATUE1 and the ZCODE in the same Z1EDPIT segment.  So I get the first ZCODE value when I only want the 2nd.   Even if I insert a context change I can't say for sure that next time I won't have 5 Z1EDPIT segments missing the ATUE1 segment before I find my first good segment that I need to map.
    ...confused...
    Thanks,
    Matt

  • Web service data control with complex input parameter problem

    Hi!
    I'm making ADF web app, using JDev 11.1.1.2.0. I have to call a web service (using a data control), which has complex input parameter (array of complex objects).
    I followed steps from Susan Duncan blog: http://susanduncan.blogspot.com/2006/09/dealing-with-complex-input-params-in.html , but I ran into a problem.
    As Susan wrote, I changed submit's button action binding to an operation in a managed bean, which returns array of objects and everything works fine. I can call a WS and my table shows the result.
    The problem is, that after I change button's action binding to my manage bean, row selection in result table doesn't work anymore (I allways get NullPointerException).
    What can be done here?
    Can somebody please help?

    Hi,
    I also have similar type of problem where I need to invoke a Web service with Complex input parameters.
    I followed Susan's blog but I stuck at a point where methos getItem is created.
    Can anyone tell me how to get that method for my requirement.
    If possible can you guys share your solutions here.
    Thanks in advance.

  • JWSDP and complex type extension problem

    Hy,
    We got a problem with JAX-RPC reference implementation. It seems it doesn't support inheritance beetween complex types as web services parameters or return value. A Parse exception happens when client code deserializes base class members. Does anyone know about this problem ? We don't have it with Apache Axis implementation (on client side). In our case, server code always runs in C++ with gSOAP.
    And the stacktrace :
    deserialization error: unexpected XML reader state. expected: END but found: START: longitude
    Here our wsdl file :
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="Service"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
    targetNamespace="urn:ass"
    xmlns:tns="urn:ass"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:WAT="urn:ass/WAT.xsd"
    xmlns:ifg="urn:ass">
    <types>
    <schema
    xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="urn:ass/WAT.xsd"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:WAT="urn:ass/WAT.xsd"
    xmlns:ifg="urn:ass">
    <complexType name="Date">
    <sequence>
    <element name="time" type="xsd:long" minOccurs="1" maxOccurs="1"/>
    </sequence>
    </complexType>
    <complexType name="DateStruct">
    <all>
    <element name="inst" type="WAT:Date" minOccurs="1" maxOccurs="1"/>
    <element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    </all>
    </complexType>
    <complexType name="IcaoCode">
    <sequence>
    <element name="s" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
    <element name="isAlphaNum" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
    </sequence>
    </complexType>
    <complexType name="IcaoCodeStruct">
    <all>
    <element name="inst" type="WAT:IcaoCode" minOccurs="1" maxOccurs="1"/>
    <element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    </all>
    </complexType>
    <complexType name="Ident">
    <sequence>
    <element name="Id" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    <element name="Name" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
    <element name="Text" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="IdentStruct">
    <all>
    <element name="inst" type="WAT:Ident" minOccurs="1" maxOccurs="1"/>
    <element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    </all>
    </complexType>
    <complexType name="Latitude">
    <sequence>
    <element name="s" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="LatitudeStruct">
    <all>
    <element name="inst" type="WAT:Latitude" minOccurs="1" maxOccurs="1"/>
    <element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    </all>
    </complexType>
    <complexType name="Longitude">
    <sequence>
    <element name="s" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="LongitudeStruct">
    <all>
    <element name="inst" type="WAT:Longitude" minOccurs="1" maxOccurs="1"/>
    <element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    </all>
    </complexType>
    <complexType name="Notam">
    <sequence>
    <element name="Id" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    <element name="Text" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="NotamStruct">
    <all>
    <element name="inst" type="WAT:Notam" minOccurs="1" maxOccurs="1"/>
    <element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    </all>
    </complexType>
    <complexType name="Pib">
    <sequence>
    <element name="Id" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    <element name="Name" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="PibStruct">
    <all>
    <element name="inst" type="WAT:Pib" minOccurs="1" maxOccurs="1"/>
    <element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    </all>
    </complexType>
    <complexType name="AirField">
    <sequence>
    <element name="longitude" type="WAT:Longitude" minOccurs="1" maxOccurs="1"/>
    <element name="latitude" type="WAT:Latitude" minOccurs="1" maxOccurs="1"/>
    <element name="codeICAO" type="WAT:IcaoCode" minOccurs="1" maxOccurs="1"/>
    </sequence>
    </complexType>
    <complexType name="AirFieldStruct">
    <all>
    <element name="inst" type="WAT:AirField" minOccurs="1" maxOccurs="1"/>
    <element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    </all>
    </complexType>
    <complexType name="SunTime">
    <complexContent>
    <extension base="WAT:AirField">
    <sequence>
    <element name="sunriseTime" type="WAT:Date" minOccurs="1" maxOccurs="1"/>
    <element name="sunsetTime" type="WAT:Date" minOccurs="1" maxOccurs="1"/>
    <element name="heuresCalculees" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    <element name="heuresExistent" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    </sequence>
    </extension>
    </complexContent>
    </complexType>
    <complexType name="SunTimeStruct">
    <all>
    <element name="inst" type="WAT:SunTime" minOccurs="1" maxOccurs="1"/>
    <element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    </all>
    </complexType>
    </schema>
    </types>
    <message name="getSuntimeRequest">
    <part name="req" type="xsd:string"/>
    </message>
    <message name="SunTimeStruct">
    <part name="inst" type="WAT:SunTime"/>
    <part name="coderet" type="xsd:int"/>
    </message>
    <portType name="ServicePortType">
    <operation name="getSuntime">
    <documentation>Service definition of function ifg__getSuntime</documentation>
    <input message="tns:getSuntimeRequest"/>
    <output message="tns:SunTimeStruct"/>
    </operation>
    </portType>
    <binding name="ServiceBinding" type="tns:ServicePortType">
    <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="getSuntime">
    <SOAP:operation soapAction=""/>
    <input>
    <SOAP:body use="encoded" namespace="urn:ass" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </input>
    <output>
    <SOAP:body use="encoded" namespace="urn:ass" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </output>
    </operation>
    </binding>
    <service name="Service">
    <documentation>gSOAP 2.1.10c generated service definition</documentation>
    <port name="ServicePort" binding="tns:ServiceBinding">
    <SOAP:address location="http://location/Service.cgi"/>
    </port>
    </service>
    </definitions>

    Try using the -f:searchschema feature of wscompile when generating the client stubs from your WSDL file.

  • Content Aware Problem

    I have used content aware with some success but today I was using it to remove power lines in front of a building with a deep blue cloudless sky in the background. When I used content aware it lightened the sky to a pale blue, no where near the original color. I sampled the existing sky with the eye dropper but no change. Please advise why this is happening. I have used content aware probably 25 times and have never encountered this problem. Thank you

    corsaseven77 wrote:
    if you have any idea what could have happened I would love to know.
    Did you miss my prior answer (post #2)?
    Try making the brush bigger, or using a selection and making it larger than the power line by a few pixels.
    It can work quite well; I've done it myself many times, but you can't work too tightly to the subject, because the pixels near the edge are affected by the subject sometimes more than you realize.
    -Noel

  • Aggregate Device problem!

    hey guys, im new to this, but i just got Logic Express 7 and i had a problem with my output. i use a fast track for my input. i found out i needed to create an aggregate device to get my output working, so i did, but my options for my device are built- in input and built-in output, and fast track. i saw that everyone selects built- in audio, so what do i do? thanks everyone

    You may want to read the "Audio Devices" PDF on this site:
    http://homepage.mac.com/edgarrothermich/Manuals.html
    He covers aggregate devices in detail. I believe he discusses creation and usage of the aggregate device.
    Mitch

  • Motu originals 828 and aggregate device problem

    hi again, thx for friends who try to help me some days ago..i can´t fix the problem
    I use a powermac g4 867 dual with 10.4.2,logic pro 7.1 and 2 motu original 828(the first model, whithout setup bottons and screen).I must use aggregate device option to get their 36 i/o, but logic crash and/or make noise on the 2nd rec, whith hardware problem window and more...i still have to work on mac os 9 to use both motu!!! Must i activate the "resample option", or clock..or any solution to fix that??
    please help.
    thx for all

    I tried using a 6 to 9 pin firewire cable to connect the Motu Ultralite to it's own port on the Powerbook with the Motu 896 HD on the other firewire port. This didn't seem to make much difference. When I turn on 'System Performance' the Audio section runs about 90% and will often peak out.
    Anybody else having similar issues? Just curious if it is my device, if I need a faster machine or simply a problem with the Aggregate device driver in OS X not working very well. Any advice appreciated. Thanks.
    Powerbook G4 1.67   Mac OS X (10.4.7)   1.5 GB RAM, 300 GB Glyph external drive, Motu UltraLite, Motu 896 HD, Logic Pro 7.2.1

  • Infuriatingly complex missing parenthesis problem!!

    Hi
    Im new to this forum but just wondering could anybody help me with this problem (or suggest another solution in sql).
    Im developing an application to calculate the distance in kilometres between 2 sets of longtitude and latitude points. Im using the Haversine formula, which in javascript is:
    var R = 6371; // km
    var dLat = (lat2-lat1).toRad();
    var dLon = (lon2-lon1).toRad();
    var a = Math.sin(dLat/2) * Math.sin(dLat/2) +
    Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) *
    Math.sin(dLon/2) * Math.sin(dLon/2);
    var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
    var d = R * c;
    "d" is the distance in km's. Im converting this to sql (im using coldfusion to output variables latitude1 and longitude1, which are hardcoded to cartain values at the moment). To find "a", the sql is:
              select
              Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                        * Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                        + Cos(<cfoutput>#latitude1#</cfoutput> * 3.14159/180)
                        * Cos(L.Latitude * 3.14159/180)
                        * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                        * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                        FROM
                             tblLocations L
    This works find and gives me the correct answer for "a". So next i need to find the value of "c" (using the formula var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a))). Im substituting the sql to find "a" for "a" in that formula. So:
    select 2 * Atan2(Sqrt(a), Sqrt(1-a)) from tblLocations
    becomes
                   select 2 * Atan2(Sqrt((Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                        * Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                        + Cos(<cfoutput>#latitude1#</cfoutput> * 3.14159/180)
                        * Cos(L.Latitude * 3.14159/180)
                        * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                        * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2))), Sqrt(1-(Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                        * Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                        + Cos(<cfoutput>#latitude1#</cfoutput> * 3.14159/180)
                        * Cos(L.Latitude * 3.14159/180)
                        * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                        * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)))) As "KM"
    from tblLocations L
    There are 33 "(" parenthesis and 33 ")" parenthesis. But im getting an error "missing parenthesis". Sql should automatically execute the most embedded formulas first and work outwards. But it seems to be failing. Am I forgetting something? Or maybe theres another apporach I could use? I tried embedding a select within a select but I cannot use the "a" answer in the embedded select for calculations in the outer select....its all very baffling!
    Thanks
    Mark

    ya thats true:) i changed it slightly:
         select 2 * Atan2(Sqrt(Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                        * Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                        + Cos(<cfoutput>#latitude1#</cfoutput> * 3.14159/180)
                        * Cos(L.Latitude * 3.14159/180)
                        * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                        * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)), Sqrt(1-(Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                        * Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                        + Cos(<cfoutput>#latitude1#</cfoutput> * 3.14159/180)
                        * Cos(L.Latitude * 3.14159/180)
                        * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                        * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)))) As "KM"
                                       FROM
                             tblLocations L
    It now works fine! Anyway, i'll use the sdo_geom.sdo_distance function. much tidier. thanks a lot for the help!
    Mark

  • Options Complex Aggregate in ODI interface

    I have one source and i need a one target aggregate table.
    I have implemented the next sample query:
    SELECT
    ATRIBUTE1,
    ATRIBUTE2,
    ATRIBUTE3,
    SUM(ATRIBUTE4),
    SUM(ATRIBUTE5),
    AVG(SUM(ATRIBUTE4+ATRIBUTE5)/ATRIBUTE6),
    FROM TABLE_AGG
    GROUP BY SUBSTR(ATRIBUTE1,0,6),ATRIBUTE2,ATRIBUTE3
    ¿Options to implement this query or similar please?
    Thanks

    Have you looked at this thread?
    how to use GROUP BY  in ODI
    Just add the SUM operator to the required target fields in your ODI interface and the GROUP BY clause will be added automatically by ODI. I note that you have a group by field that doesn't exist in your select list - was this deliberate?

Maybe you are looking for