Point-in-polygon query with SDO_GEOMETRY.RELATE

Hello All,
I'm trying to perform a simple point-in-polygon query using
SDO_GEOMETRY.RELATE. Only the "anyinteract" mask seems to return
the correct answer. Can someone point out what I'm doing wrong
and/or suggest a better way to do this. My objective is simply
to return a count of the number of features in the point table
that fall with the selected feature in the polygon table.
select count(*) count from pnttest pnt, polytest poly,
user_sdo_geom_metadata m where SDO_GEOM.RELATE(pnt.shape,
m.diminfo, 'anyinteract',poly.shape,m.diminfo) = 'TRUE'
and m.table_name = 'POLYTEST' and m.column_name = 'SHAPE' and
poly.ADMIN_NAME = 'California'
I would have thought the "inside" mask would be what I want but
it returns 0 instead of the correct answer of 6.
Thanks for any help or suggestions!
-- john

Hi John,
If I wanted to do this as fast as possible, and didn't mind
returning points that touch the boundary of the polygon, I would
do something like this (assuming the point layer is indexed):
select /*+ ordered */count(*) count
from polytest poly, pnttest pnt
where SDO_RELATE(pnt.shape,poly.shape,
'mask=anyinteract querytype=window') = 'TRUE'
and poly.ADMIN_NAME = 'California';
If you are wondering what relationship Oracle Spatial thinks
there is between the 6 points and the state, try using the
determine mask with the 6 geometries that return from
anyinteract.
If you are using Oracle Spatial pre-9i, you might also want to
add layer_gtype=point in the quotes.
Hope this is useful.
dan

Similar Messages

  • Point in Poly query?

    How do I perform a simple point in poly query with spatial?
    If I have a set of coordinates (-86.524442 39.7748187) for which I want to know which polygon they fall inside of?
    Thanks in advance-M.

    A query like this should get what you're after :
    select county
    from counties c
    where sdo_relate(c.geom, mdsys.sdo_geometry(2001,
    null,
    mdsys.sdo_point_type(-86.524442,39.7748187,null),
    null, null),
    'mask=contains querytype=window') = 'TRUE'
    This will return "Hendricks" county which I believe is correct.
    The relevant parms for the mdsys.sdo_geometry object are the "2001" which specifies a point object and then the creation of the actual sdo_point_type itself. The third parm to this object is null as that is the Z access.
    The Oracle Spatial Users Guide is very useful and has lots of information and examples of this kind of thing.
    Steve

  • Query with Relations

    Hi,
    Can BEA weblogic 7.0 ejbc support Query with relations ?
    I have two CMP entity beans: Party and User. Party and User have 1:1 relation.
    In User Bean, I try to write following query using relation to party
    SELECT OBJECT(r) FROM User r WHERE r.login = ?1 and r.password = ?2 and r.party.uUID=
    ?3
    yet, I got following:
    weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
    While trying to process Query
    SELECT OBJECT(r) FROM User r WHERE r.login = ?1 and r.password = ?2 and r.party.uUID=
    ?3
    Could not parse EJB QL expression.
    The problem is at "r.party.uUID = ?3". If I removed the this part, then it ejbc
    is happy.
    So my question is : is Weblogic 7 support query with relations ?
    or I have to write my own SQL query ?
    Thanks
    Chester

    OK, I answered my own question. Weblogic 7 does support query relations.
    notice that "r.party.uUID= ?3" there is no space between "uUID" and "=".
    ejbc apparently needs space. I added the space. ejbc is happy.
    I don't recall EJB QL is space sensitive. This should be a bug.
    Chester
    "Chester" <[email protected]> wrote:
    >
    Hi,
    Can BEA weblogic 7.0 ejbc support Query with relations ?
    I have two CMP entity beans: Party and User. Party and User have 1:1
    relation.
    In User Bean, I try to write following query using relation to party
    SELECT OBJECT(r) FROM User r WHERE r.login = ?1 and r.password = ?2 and
    r.party.uUID=
    ?3
    yet, I got following:
    weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
    While trying to process Query
    SELECT OBJECT(r) FROM User r WHERE r.login = ?1 and r.password = ?2 and
    r.party.uUID=
    ?3
    Could not parse EJB QL expression.
    The problem is at "r.party.uUID = ?3". If I removed the this part, then
    it ejbc
    is happy.
    So my question is : is Weblogic 7 support query with relations ?
    or I have to write my own SQL query ?
    Thanks
    Chester

  • Query with relative paths

    I have a client who is fairly au fait with Dreamweaver but has run into some difficulties so they have asked me to take over.
    The problem files' (downloaded from the net into Dreamweaver using the 'get' function), relative paths were 'out' by an extra hierarchical level and hence didn't display or work correctly locally on my laptop. I haven't yet looked into why this was the case but was able to fix it without too much hassle by using the find and replace feature.
    However I am confused as to why these html pages display correctly online as their paths have an extra ../ in them.
    One of the pages that has the extra level is this http://www.wildlifeartgallery.com/exhibitions/harry_becker2/harry_becker2_page1.html
    The hierachy of the files in the website is as below with the scripts and styles folders on the same level as the index.html page. The problematic pages are located 'exhibitions/harry_becker2/harry_becker2_page1.html' to page7 (page 10 is me testing).
    Surely the relative links to the styles folder should be ../../ as they are with all the other artists' exhibition pages rather than ../../../ ??
    I would be most grateful if someone could take a look for me and give me an expIanation as to how the CSS and scripts display and work without issue when they seem to be linked incorrectly or is it me going mad!!
    Thanking you in anticipation.
    Lisa
    FYI I use Dreamweaver CS5.5 on OSx 10.6 and my clients use Dreamweaver CS6 on Mountain Lion.

    First thing I will tell you at the outset is that before you downloaded the site from the remote server, you should have defined a site on your laptop by creating the necessary folders for the site name, css, scripts, images, downloads, etc etc.  this would have put you in a better position and you would have avoided doing find & replace work.
    Now coming to your main question, the links in a website are either document relative or site relative.  The difference is that with site relative, you need to provide the full http:// address but with document relative, DW will put the links like this:
    <link href="css/main.css" rel="stylesheet" type="text/css">
    </head>
    As your site is now working, you will be better off keeping it as it is otherwise, you can read the first part of David's tutorial that teaches how to setup the basic site.  It doesn't go into creating folders for images, css, scripts etc but you get the idea after you have worked on his tutorial.
    <http://www.adobe.com/devnet/dreamweaver/articles/first_website_pt1_cs6.html>
    Good luck.

  • Point-in-polygon performance  -large polygon w many vertices

    Dear Everybody,
    I was experimenting with the performance of point-in-polygon queries for very different polygon layers. My experience was that queries can be extreme slow, if the polygons are large and have many vertices (e.g., the administrative boundary of a state).
    I could also explain, why this is so:
    *because of the large area, geographic indices do not help: after the first filtering step (the filtering on the basis of the indices) the immediate result  is still very large, and
    * the large number of potential hits after the first filtering step have to be processed in a - due to the many vertices - very processor intensive second filtering step.
    That is, there are two causes making the second filtering step very expensive.
    Could you please comment on this? Does anybody have any experiences?
    Thanks in advance!

    Hi Gergely,
    Thanks for your suggestion, I am thinking about that too. But the polygon I am using is dynamically built by user when they use the application. They choose some lines, and then I build a buffer around those lines based on some parameters user input, and it could get complicated since it varies all the time. I was thinking maybe there is a parameter in sdo_buffer function, which should allow to reduce the number of vertices used to build the buffer polygon? kind of stumped in this problem. maybe I should open a TAR to request better solution. A query which sometimes takes a hour to finish is obviously not acceptable, although it is not always the case. :-(
    Tim

  • How to create an ABAP Query with OR logical expression in the select-where

    Hi,
    In trying to create an ABAP query with parameters. So it will select data where fields are equal to the parameters entered. The default logical expression is SELECT.. WHERE... AND.. However I want to have an OR logical expression instead of AND.. how can I attain this??
    Please help me on this.. Points will be rewarded.
    Thanks a lot.
    Regards,
    Question Man

    Hi Bhupal, Shanthi, and Saipriya,
    Thanks for your replies. But that didn't answer my question.
    Bhupal,
    You cannot just replace AND with OR in an ABAP QUERY. ABAP QUERY is a self generated SAP code. You'll just declare the tables, input parameters and output fields to be displayed and it will create a SAP standard code. If you'll try to change the code and replace the AND with OR in the SAP standard code, the system will require you to enter access key/object key for that particular query.
    Shanthi,
    Yes, that is exactly what need to have. I need to retireve DATA whenever one of the conditions was satisfied.
    Saipriya,
    Like what I have said, this is a standard SAP code so we can't do your suggestion.
    I have already tried to insert a code in the ABAP query (there's a part there wherein you can have extra code) but that didn't work. Can anybody help me on this.
    Thanks a lot.
    Points will be rewarded.
    Regards,
    Question Man

  • A query with respect to creation of the  shared Objects.

    Hi ,
    I am having a query with respect to creation of the  shared Objects.
    I have seen a example where the Author is creatining Shared Object as shown
    below :
    SharedObj = null;
    sharedObj = SharedObject.getLocal("myTasks");
    and there is nothing related to the word "myTasks" anywhere in the Application .
    Can anybody please let me know what is this word "myTasks" mean here ??
    Thanks in advance .

    hi,
    With a shared object it will create one if it doesn't exist, so "myTasks" will become the shared object name or if it exists it will load any objects that are within that shared object.
    Below is a simple example that uses sharedobjects to store login details.
    http://gumbo.flashhub.net/login/
    David

  • Is that important column order in a query with row_number function

    Hi folks,
    I am using Oracle 11g R2 on HP-UX machine.
    I have 2 types of query with row_number and I think they are same but output of each of them are different. I changed only column order in query2.
    Query 1 :
    (SELECT
    "LOOKUP_INPUT_SUBQUERY"."CONTRACT_SK" "CONTRACT_SK",
    "LOOKUP_INPUT_SUBQUERY"."SIMCARD_SK" "SIMCARD_SK"
    FROM (
    SELECT row_number ()
    OVER (
    PARTITION BY "R_CON_SUBS_SIMCARD_LK".
    "CONTRACT_SK"
    ORDER BY
    "R_CON_SUBS_SIMCARD_LK"."START_DATE" DESC,
    "R_CON_SUBS_SIMCARD_LK"."SEQ_NUM" DESC NULLS LAST) /* EXPRESSION_3.OUTGRP1.SIRA */
    "SIRA",
    "R_CON_SUBS_SIMCARD_LK"."CONTRACT_SK" "CONTRACT_SK",
    "R_CON_SUBS_SIMCARD_LK"."SIMCARD_SK" "SIMCARD_SK"
    FROM "SRC_OZRDS"."R_CON_SUBS_SIMCARD_LK" "R_CON_SUBS_SIMCARD_LK")
    "LOOKUP_INPUT_SUBQUERY"
    WHERE ("LOOKUP_INPUT_SUBQUERY"."SIRA" = 1))
    Output of this like that :
    CONTRACT_SK SIMCARD_SK
    1     1
    1     3
    1     4
    1     5
    1     6
    1     11
    1     12
    1     14
    1     15
    1     16
    Query 2 :
    (SELECT
    "LOOKUP_INPUT_SUBQUERY"."CONTRACT_SK" "CONTRACT_SK",
    "LOOKUP_INPUT_SUBQUERY"."SIMCARD_SK" "SIMCARD_SK"
    FROM (
    SELECT
    "R_CON_SUBS_SIMCARD_LK"."CONTRACT_SK" "CONTRACT_SK",
    "R_CON_SUBS_SIMCARD_LK"."SIMCARD_SK" "SIMCARD_SK",
    row_number ()
    OVER (
    PARTITION BY "R_CON_SUBS_SIMCARD_LK".
    "CONTRACT_SK"
    ORDER BY
    "R_CON_SUBS_SIMCARD_LK"."START_DATE" DESC,
    "R_CON_SUBS_SIMCARD_LK"."SEQ_NUM" DESC NULLS LAST) /* EXPRESSION_3.OUTGRP1.SIRA */
    "SIRA"
    FROM "SRC_OZRDS"."R_CON_SUBS_SIMCARD_LK" "R_CON_SUBS_SIMCARD_LK")
    "LOOKUP_INPUT_SUBQUERY"
    WHERE ("LOOKUP_INPUT_SUBQUERY"."SIRA" = 1))
    Output of this like that:
    2     874812
    7     70097256
    8     18734091
    9     158024
    10     815397739
    13     22657919
    19     83177779
    20     82579529
    22     5829949
    23     35348926
    25     3865978
    I expected the second output, because there are lots of contract sk but there is one contract_sk in first query result. i did not get the point. What is the problem ?

    user8649469 wrote:
    I changed only column order in query2.So what else do you expect? If you order, for example, by last name, fist name don't you think rows will be returned in a different order (and therefore same row will have different row number) than ordering by first name, last name?
    SY.

  • Query rewrite problem related to FGAC/RLS/VPD

    My problem in related to Fine Grained Access Control / DBMS_RLS.
    Let's start with a simple example and elaborate further.
    Basic problem:
    Let's say we have two tables:
    create table LEVEL1( L1NR NUMBER not null, TAG NUMBER);
    alter table LEVEL1 add constraint LEVEL1_PK primary key (L1NR);
    create table LEVEL2( L1NR NUMBER, L2NR NUMBER not null);
    alter table LEVEL2 add constraint LEVEL2_PK primary key (L2NR);
    alter table LEVEL2 add constraint LEVEL2_FK foreign key (L1NR) references LEVEL1 (L1NR);
    I want to convince the database to rewrite a query that looks like this:
    A)
    SELECT L1.TAG, L2.L2NR
    FROM
    LEVEL2 L2
    INNER JOIN LEVEL1 L1
    ON L2.L1NR = L1.L1NR
    WHERE
    EXISTS( SELECT 1 FROM LEVEL1 L1B WHERE L1B.L1NR = L2.L1NR)
    As L2 will be joined to L1 for my human eye and mind
    it is obvious that the where clause is redundant,
    and the query is equivalent to:
    B)
    SELECT L1.TAG, L2.L2NR
    FROM
    LEVEL2 L2
    INNER JOIN LEVEL1 L1
    ON L2.L1NR = L1.L1NR
    Is there any way to convince the parser/optimizer to remove the redundant join?
    Why do I have a query like A) and why I cannot rewrite it myself I will explain below.
    For those to ask themselves why do I need such a thing let me elaborate.
    We develop an application and we want to enforce security on the data at the row level.
    The problem is more complicate than my following example, but the example is good enough.
    Let's say that we have an application that makes invoices.
    We want to give a user the privilege to make reports on the invoices issued for a category of customers.
    I see three main ways to enforce row level security on data:
    1) At the application level
    2) Using views
    3) Using Fine Grained Access Control / DBMS_RLS
    Choice 1) is more flexible, but it has a major drawback:
    You cannot make the database available for reporting with BI/ad-hoc reporting tools.
    And also you have to be careful with every query you write. Or create something that takes care of the security, which can be really tricky.
    And it also makes report creation for the application difficult since you need to embed the security system into the reporting module.
    If you use Crystal Reports or some other reporting tool to build your application report you've got a problem.
    Choices 2) and 3) are somewhat similar, but 3) is more flexible
    For those who don't know how FGAC/DBMS_RLS works and don't want to dig deeper here is a short explanation:
    DBMS_RLS allows the database developer to attach dynamic where clauses to queries.
    It does this by rewriting queries like:
    "select blabla from employees"
    to "select blabla from (select * from employees where <some expression that filters the data according to the user's policy>)"
    The filters are attached on a table by table basis, so queries like:
    SELECT dept.NAME, empl.NAME
    FROM
    DEPARTMENT dept
    INNER JOIN employees empl
    are rewritten to
    SELECT dept.NAME, empl.NAME
    FROM
    (SELECT * FROM DEPARTMENT WHERE <FILTER_DEPT>) dept
    INNER JOIN (SELECT * FROM employees WHERE <FILTER_EMP>) empl
    So far so good, nothing looks bad, but the devil is in the detail
    Back to our reporting problem.
    Let's say we have a scenario simpler than life, and I associate the user directly to a customer category by adding a CUST_CAT_ID column to the APP_USER table.
    I want restrict the user to see only the data associated to its category (category, customers, invoices, invoice item)
    So when he writes "select NAME, ADDRESS from customer" the query is rewritten to
    "select NAME, ADDRESS from (SELECT * FROM CUSTOMER WHERE (EXISTS SELECT 1 FROM category join app_user on ... where customer.CUST_CAT_ID = app_user.CUST_CAT_ID and app_user.login = get_current_user()))"
    where get_current_user is some framework function that gives me the current user.
    A little complicated, but nothing too scary.
    But when I write something like:
    SELECT <relevant columns> FROM category cat JOIN customer cust JOIN invoice inv JOIN invoice_item item WHERE <some filters>
    ...(query totally legitimate for a sales report), this gets expanded to a scary query that looks like this:
    SELECT <relevant columns>
    FROM
    (SELECT * FROM category WHERE (EXISTS SELECT 1 FROM app_user u WHERE u.CUST_CAT_ID = CAT_ID AND u.login = get_current_user())) cat
    JOIN (SELECT * FROM customer WHERE(EXITS SELECT 1 FROM category JOIN app_user WHERE ...)) cust
    JOIN (SELECT * FROM invoice WHERE(EXITS SELECT 1 FROM customer JOIN category JOIN app_user WHERE ...)) inv
    JOIN (SELECT * FROM invoice_item WHERE(EXITS SELECT 1 FROM invoice JOIN customer JOIN category JOIN app_user WHERE ...)) item
    WHERE
    <some filters>
    Oops! A query with 4 tables is expanded to a 14 tables query, when all I really need is:
    SELECT <relevant columns>
    FROM category cat JOIN customer cust JOIN invoice inv JOIN invoice_item item
    WHERE <some filters> AND (EXISTS SELECT 1 FROM app_user u WHERE u.CUST_CAT_ID = CAT_ID AND u.login = get_current_user())
    Let me tell you that we don't use here roles and privileges tables that we must use in a real life scenario.
    In a real life scenario we will easily transform the original query in a 20-30 table join (grrrrrrr).
    Well, I cannot change the way DBMS_RLS/FGAC works, and also if I choose to use views I cannot write a filtered view for every possible join that a user might create.
    All I want is to find out if there is any way to instruct the parser/optimizer, using primary and foreign keys, optimizer parameters hints and other methods, to rewrite the query and eliminate redundant joins.
    Of course I can create some materialized views or bitmap join indexes to help me in the process and speed up the query, but using this method in a database that has hundreds of tables can be a little problem in terms of management and performance.

    Hello again,
    It appeared that, the problem is present only when I try the query in pl/sql developer.
    For some reason, even though I set QUERY_REWRITE_INTEGRITY to STALE_TOLERATED, it behaved as this parameter was set to ENFORCED.
    So the case was that:
    for session - STALE_TOLERATED
    for system - ENFORCED
    In v$parameter2 against "QUERY_REWRITE_INTEGRITY" was shown "stale_tolerated", but the query was not rewritten.
    When I do the same (altering the session and perform the select query) in SQLPlus, everything works as expected - the query is rewritten.
    And I conclude the problem is in PL/SQL Developer (my version is 8.0.1.1498) or something related to this.
    Edited by: Verdi on 2010-2-12 14:00

  • Input query with dynamic actual & forecast values by month per year

    Hello,
    I am working on a Input ready query for a forecasting application which shows both actuals and forecast numbers and the user will revise the forecast numbers by month
    Requirement: I want to build a Input query for monthly forecasting for the current year. It will be dynamic rolling of months with actuals & forecast data.
    E.g. My report has 12 months for the current year
    and if run the report in May, the months before May has to show the actuals and the months after May has to show the old forecast data so that the user will revise the numbers again in each month and save the data to the real time cube.
    Jan.Feb.Mar.Apr.May.Jun.Jul.Aug.Sept.Nov.Dec
    Act Act  Act Act Act  Old frcst for the remaining months
      user will revise forecast for these months
    So, i am able to create Input query with all restricted key figures( plan kf has change mode set to change, actual kf are not set change) and calculate key figures and all the logic is done on dynamically moving/rolling the data based on the input month of the year.
    But the problem is that i am using cal kf to dynamically roll months, i was not able to set the change option for the cal kf.
    So, how can i make sure that the dynamically changed plan months will open for entering forecast and the actuals months not to change?
    Do you guys have any better solutions in implementing it?
    I really appreciate it your input....:)
    Thanks,
    Srini

    Hi,
    Please look at the following DOC which may be useful to you and if so please grant me point.
    Regards,
    SUbha'
    Input-Ready Query
    Use
    You use input-ready queries to create applications for manual planning. These can range from simple data entry scenarios to complex planning applications.
    Integration
    You define a query that you want to use for manual planning in the BEx Query Designer (see Defining New Queries).
    In the Web Application Designer or the BEx Analyzer, you can combine the input-ready queries with other queries and planning functions to create complex planning applications.
    Prerequisites
    You can define an input-ready query on any of the following InfoProviders:
    &#9679;     Aggregation levels (see Aggregation Levels)
    &#9679;     MultiProviders that include at least one simple aggregation level
    The aggregation levels are created in the planning modeler; MultiProviders are defined in the modeling functional area of the Data Warehousing Workbench.
    Features
    Definition of an Input-Ready Query
    Once you have defined a query on an InfoProvider, you see the Planning tab page under the Properties of structural components (for example, in key figures or restricted key figures). The options provided there allow you to determine which structural components of an input-ready query are to be input ready at runtime and which are not. With structural components that are not input ready, you can also determine whether these components are viewed as reference data or are just protected against manual entry.
    For the structural components, you also have the following options:
    Input readiness of structural components of a query
    Option
    Description
    Not input ready (reference data)
    If they are being used as reference data, the structural components are not protected by data locks to ensure exclusive access for one user because this data serves as a reference for many users.
    This is the default setting.
    Not input ready (no reference data)
    If you want to protect structural components against manual entries but allow changes by planning functions, you can use locks to protect this data for one particular user. In this way you can ensure that the planning function works with the displayed data only and not with data that has been changed by other users.
    Input ready
    You can also determine whether an input ready query is to be started in change mode or in display mode. You find this property in the Query Properties on the Planning tab page. If there is at least one input-ready query component, the query (as long as it has not been determined otherwise) is started in display mode.
    In BI applications that use input ready queries as data providers, you can enter data manually at runtime. For more information, see Performing Manual Planning and Creation of Planning Applications.
    Example
    You want to create an input-ready query for manual planning for a plan-actual comparison of revenues for a set of products. You want the plan data in a real-time-enabled InfoCube and the actual data in a standard InfoCube.
           1.      Create a MultiProvider that includes the InfoCubes for the plan and actual data.
           2.      Define an aggregation level on the MultiProvider which contains the characteristic Product and the key figure Revenue.
           3.      On the aggregation level, create two restricted key figures Plan Revenue and Actual Revenue. For restriction, choose the characteristic 0INFOPROV and restrict it to the plan or actual InfoCube.
           4.      Add the restricted key figures to the key figure structure. Insert Product into the rows. For Plan Revenue, choose Input Ready for the input-readiness option. For Actual Revenue, choose the option Not Input Ready (Reference Data).
           5.      In the query properties, set the indicator that determines whether the queries are started in display or change mode as required.
    Example of an input-ready query
    Product
    Plan Revenue
    Actual Revenue
    P01
    20
    P02
    30
    If you want to keep actual and plan data in a real-time enabled InfoCube, you do not require a MultiProvider for the task described above. Create an aggregation level on the InfoCube and define the input-ready query for the aggregation level. In the example above, a version characteristic acts as the InfoProvider. Create restricted key figures with the plan or actual version and proceed as in the previous example.

  • Doubt in Firing Query with multiple opportunities UUID/IDs

    HI Folks!
    I might have simple doubt but please help me on this!
    1. I have a custom BO with association to opportunities.
    [DeploymentUnit(CustomerRelationshipManagement)] businessobject Sy_Trade {
    [AlternativeKey] [Label("Trade Id")] element tradeid : BusinessTransactionDocumentID;
    node RelatedOpportunities [0,n]{
                                  element BusinessTransactionDocumentReference : BusinessTransactionDocumentReference;
                                  element BusinessTransactionDocumentRelationshipRoleCode : BusinessTransactionDocumentRelationshipRoleCode;
                                   association RelatedOpportunity[0,1] to Opportunity;
    2. I have success fully used association and i am able to view create all the opportunities related to my custom Bo.
    ISSUE : I want a facet where i just want DISPLAY the activities and sales document assigned in the RELATED OPPORTUNITIES ( N opportunities )
    How do i query with Multiple opportunities ID and fetch the activities against it?
    Btw I want to use query in UI Designer... I have created an  advanced list pane and there i want the result list
    I hope i am clear!
    Thanks in adavance...
    Regards
    Dhruvin

    Hi Ludger,
    I have successfully displayed Related Opportunities associated with trade.( i am able to create , delete also )
    Issue : I am not able to "Display" ( i don't need to edit or create ) all the activities created against all the opportunities in a different tab.
    I tried to approaches :
    1: Query : Created a Query on Activity BO and tried to pass multiple related opportunities ( but seems not possible , please tell me any possibility to pass range of opportunity via transformation or anything? )
    2 : binding : I have a Node Related Opportunity so just tried to bind it with BO model but problem is it is displaying all the activities of first opportunity of the list...
    i think why because :
    In Data model I have created a table bind with Related Opportunities...
    now that node is 1 to N , association to opportunity 0 to 1 , hence i think it fetches only 1 opportunities activity
    should i create like below ( Or is it possible)
    Node Reltdoppts[0,1]
    association [0,N] to opportunity BO ?
    Although i strongly feel SAP should provied us two things :
    1. We need to pass range of opportunities in a query.
    2. We need to just write some absl code where i can fill the table and display it
    and also is there any possibility to create a report or something to display activities as we just want to display the activities!
    P.S : I have been getting a lot of bashing from client because some of the product restriction in cloud! i hope and wish SAP give developers free hand to develop right now its like our hands are tied to many things

  • Creating Query with dynamic columns to show results

    Hi experts,
    I need to know how to create a query with dynamic columns. Meaning, I don't want to create a query with fixed columns representing the 12 periods of the fiscal year to show me actuals as the fiscal year proceeds.
    For example, if I am currently in the middle of period 3 (March) of a fiscal year, when I execute the query, I need it to automatically only show me the 'Actuals' for periods 1 and 2, without seeing the columns from periods 3 to 12 showing blank.
    Then when I am in the middle period 5 (May) the query should ONLY show me the columns for periods 1 to 4 'Actuals', no results should be shown for periods 5 to 12 yet, and I don't want to even see blank columns for period 6 to 12.
    How do I define my columns, to achieve this.
    Maximum points will be awarded.
    Thanks Everyone.

    Hi Josh,
    I'm having a little difficuluty understanding what should be included in my restricted key figures.
    The time characteristics that I have available to use are:
    0FISCPER3 (posting period)
    0FISCYEAR (fiscal year), currently using SAP EXIT to default current fiscal year.
    0FISCVARNT (fiscal year variant).
    In addition, I have the following characteristics available to be used in the columns:
    Value type (10)
    version (currently I'm using variable for it)
    Currency type (020)
    Currency (USD).
    Can you explain what my restricted key figure should be based on and how it should look.
    I tried to create a restircted key figure using 0AMOUNT, and 0FISCPER3. For 0FISCPER3  I created a range from 1 to previous period (using SAP EXIT that supplied previous period).I also had value type, version, currency type, and currency included in that restricted key figure.Then when I tried to drag 0FISCPER3 under the restricted key figure once again, it wouldn't let me, probably because I've already used 0FISCPER3 in the restricted key figure.
    Please let me know if my explanation is not clear.
    Your step by step help would be great.
    Thanks
    Edited by: Ehab Mansour on Sep 23, 2008 2:40 PM

  • Query with two spatial operators

    Hi,
    I need prepare query with sdo_any_interact and sdo_filter
    Following query doesn't work any ideas?
    SELECT ROWID, GEOMETRY, 'MVDEMO:L.MAJOR TOLL ROAD', null, 'null', -1, 'rule#0'
    FROM PARCELS P
    WHERE SDO_ANYINTERACT(P.GEOMETRY,
    (SELECT L.GEOMETRY
    FROM SHP_SIMPLYFIED L
    WHERE L.TASK = '4')) = 'TRUE'
    and MDSYS.SDO_FILTER(P.GEOMETRY
    , MDSYS.SDO_GEOMETRY(2003
    , 2180
    , NULL
    , MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3)
    , MDSYS.SDO_ORDINATE_ARRAY(482850, 236980, 510333, 248133))
    --, MDSYS.SDO_ORDINATE_ARRAY(:MVQBOXXL, :MVQBOXYL, :MVQBOXXH, :MVQBOXYH))
    , 'querytype=WINDOW') = 'TRUE'
    Kind regards,
    Tomek

    Hi Jack,
    Join - the same error:
    the error is
    ORA-00904: "MDSYS"."SDO_PQRY": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:
    *Action:
    Error at Line: 13 Column: 60
    TASK column - is not null, unique
    parcels are partitioned table (3 000 000 rows)
    i think this error is connected with partitoning
    in the first version i put any_interact into view with read only option
    select * from this view works fine but take a long time,
    next i build theme in MapBuider but preview return error (same), (MapBuilder buid query on view and add query_window filter to reduce number of objects)
    Thx,
    Tomek

  • Tuning SQL query with SDO and Contains?

    I'trying to optimize a query
    with a sdo_filter and an intermedia_contains
    on a 3.000.000 records table,
    the query look like this
    SELECT COUNT(*) FROM professionnel WHERE mdsys.sdo_filter(professionnel.coor_cart,mdsys.sdo_geometry(2003, null, null,mdsys.sdo_elem_info_array(1,1003,4),mdsys.sdo_ordinate_array(809990,2087279,778784,2087279,794387,2102882)),'querytype=window') = 'TRUE' AND professionnel.code_rubr ='12 3 30' AND CONTAINS(professionnel.Ctx,'PLOMBERIE within Nom and ( RUE within Adresse1 )',1)>0
    and it takes 15s on a bi 750 pentium III with
    1.5Go of memory running under 8.1.6 linux.
    What can i do to improve this query time?
    null

    Hi Vincent,
    We have patches for Oracle 8.1.6 Spatial
    on NT and Solaris.
    These patches include bug fixes and
    performance enhancements.
    We are in the process of making these patches
    avaialble in a permanent place, but until then, I will temporarily put the patches on:
    ftp://oracle-ftp.oracle.com/
    Log in as anonymous and use your email for
    password.
    The patches are in /tmp/outgoing in:
    NT816-000706.zip - NT patch
    libordsdo.tar - Solaris patch
    I recommend doing some analysis on
    individual pieces of the query.
    i.e. time the following:
    1)
    SELECT COUNT(*)
    FROM professionnel
    WHERE mdsys.sdo_filter(
    professionnel.coor_cart,
    mdsys.sdo_geometry(
    2003, null, null,
    mdsys.sdo_elem_info_array(1,1003,4),
    mdsys.sdo_ordinate_array(
    809990,2087279,
    778784,2087279,
    794387,2102882)),
    'querytype=window') = 'TRUE';
    2)
    SELECT COUNT(*)
    FROM professionnel
    WHERE CONTAINS(professionnel.Ctx,
    'PLOMBERIE within Nom and ( RUE within Adresse1)',1) >0;
    You might want to try reorganizing the entire
    query as follows (no promises).
    If you contact me directly, I can try to
    help to further tune the SQL.
    Hope this helps. Thanks.
    Dan
    select count(*)
    FROM
    (SELECT /*+ no_merge */ rowid
    FROM professionnel
    WHERE mdsys.sdo_filter(
    professionnel.coor_cart,
    mdsys.sdo_geometry(
    2003, null, null,
    mdsys.sdo_elem_info_array(1,1003,4),
    mdsys.sdo_ordinate_array(809990,2087279,
    778784,2087279,
    794387,2102882)),
    'querytype=window') = 'TRUE'
    ) a,
    (SELECT /*+ no_merge */ rowid
    FROM professionnel
    WHERE CONTAINS(professionnel.Ctx,
    'PLOMBERIE within Nom and
    ( RUE within Adresse1)',1) >0
    ) b
    where a.rowid = b.rowid
    and professionnel.code_rubr ='12 3 30';
    **NOTE** Try this with no index on code_rubr
    null

  • Hierarchical query with where clause

    Hi,
    How can I query hierarchically a query with WHERE clause? I have a table with three fields session_id,id and root_id.
    When I try with the following query,
    select id, level from relation
    where session_id = 79977
    connect by prior id = root_id start with id = 5042;
    It gets duplicate values.
    I want the query to show in the hierarchical manner with a filter condition using WHERE clause. Please help me how can I achieve this. If you know any link that describes more about this, please send it.
    Thanks in Advance.
    Regards,
    -Parmy

    Hi Sridhar Murthy an others,
    Thanks a lot for your/the answer. It's working for me. It saved a lot of other work around without the proper knowledge of hierarchical query. Please send me any link that describes these issues in detail and also I hope as I have mentioned in the other message, same cannot be achieved on views or ( on two different tables ???)
    Any way thanks for your reply,
    It's working for me.
    With happiness,
    -Parmy

Maybe you are looking for

  • Basic Runtime for VS 2008

    I have a report that I designed in Crystal 10.  The report runs with no problems from within the designer.  However when I try to run the report in my .NET application and export to a PDF I have no luck.  The report engine just hangs.  I have a diffe

  • How to see the billed invoices in VF04 transaction

    Hi, All I would like to find a way to see the invoice number for collective billing. When we process more than one Delivery at a time, The invoice number is generated in background and in order to find it that we have to reference back to the deliver

  • Can any one pls tell me the procedure of crm datasourse data extraction r/3

    hi pls can any one pls tell me the procedure of crm datasourse data extraction from r/3 regards subbu

  • How to delete matrix row using rightclick ?

    Hi all , I have UDO form .when i right click on a matrix  then contextual menu appears only(Copy,Remove,Cancel) not appears  (DELETE ROW ) .plz help how to contextual menu appears with (Delete Row) and which event fire when i click delete row. thanks

  • Black Screen in Motion

    Motion works fine till I hide it...When I re-open I get a Total Black Screen...have to find area on screen where motion windows absent, click and Motion appears but when I click on any Motion window Black Screen again!