All polygons in a unique multipolygon

I know maybe this is an easy problem, but I searched everywhere and not find the answer.
I have a table with many polygons. How can I make a query that returns me only one register which is a multipolygon including all the polygons? I'm not talking about SDO_UNION and SDO_AGGR_UNION, because these return me a polygon with the orignal polygons merged. I want they together in a multipolygon, but not merged.
Thanks in advanced.

Hi,
I didn't look at Luc's code. However, I modify my function to include the table name and geometry column name in the function. You can use the function on views or tables. It is not an aggregrate function but should do what you want.
Jack
create or replace function multi_polygon_w_table(table_name varchar2, geom_col_name varchar2)
return sdo_geometry
is
mpoly_geom sdo_geometry := null;
TYPE t_cursor is REF CURSOR;
cur t_cursor ;
geom sdo_geometry := null;
sql_stmt varchar2(256);
begin
sql_stmt := 'select ' || geom_col_name || ' from ' || table_name ;     
open cur for sql_stmt;      
loop
fetch cur into geom;
exit when cur%NOTFOUND;
mpoly_geom := sdo_util.append(mpoly_geom,geom) ;
end loop;
return mpoly_geom;
end multi_polygon_w_table;
select multi_polygon_w_table('POLYGON_TABLE','GEOMETRY') from dual;

Similar Messages

  • Data Managers from all applications into one unique package

    Hi,
    The issue is that we are trying to put all the Data manager packages in all applications into one unique package.
    If BPC admin changes the parameters or currency rates , he just has to run that one package which includes all necessary
    packages and he may look into logs if he has to.
    Firstly , We tried to put multiple run_logic process types into one process chains, but it is giving errors like;
    u201CAn exception with the type CX_SY_TABLE_KEY_SPECIFICATION occurred, but was neither handled locally, nor declared in
    a RAISING clause Line Type Contains a Component with the Name FI_ACCu201D
    or
    u201CAn exception with the type CX_SY_OPEN_SQL_DB occurred, but was neither handled locally, nor declared in a RAISING clause
    The system tried to insert a data record, even though a data record with the same primary key already existsu201D.
    Secondly, after we read the blog () and we tried to run program
    UJD_TEST_PACKAGE , but we get errors with %SELECTION% prompt variable.
    Is there any other solution you can advise?
    If we use the program UJD_TEST_PACKAGE how do we fill AnswerPrompt paremeter file for the dynamic script below?
    PROMPT(SELECTINPUT,,,"Lütfen bir kategori seçiniz.","%CATEGORY_DIM%,%TIME_DIM%")
    PROMPT(TEXT,%LEVEL%,"XX Level",,"7,6,5,4,3,2,1")
    INFO(%EQU%,=)
    INFO(%TAB%,;)
    TASK(XXX_LOGIC,TAB,%TAB%)
    TASK(XXX_LOGIC,EQU,%EQU%)
    TASK(XXX_LOGIC,SUSER,%USER%)
    TASK(XXX_LOGIC,SAPPSET,%APPSET%)
    TASK(XXX_LOGIC,SAPP,MM)
    TASK(XXX_LOGIC,SELECTION,%SELECTION%)
    TASK(XXX_LOGIC,LOGICFILENAME,XXXX.LGF)
    TASK(XXX_LOGIC,REPLACEPARAM,LEVEL%EQU%%LEVEL%)
    Best Regards,
    Melike

    Hi.  I have a similar issue to the one posted below in that I want to run a logic script for one application (call it Application A) from a DM package in a different application (Application B).  This is to stop the user from having to switch between applications to run the logic.
    I have tried the following:
    1. I have tried putting the script logic from App A into App B, but the dimensionality is different so it fails to validate.
    2. I have tried "hard coding" the application name within the process chain, but it fails with an error "u201CAn exception with the type CX_SY_TABLE_KEY_SPECIFICATION occurred ...." similar to the post below.
    Any suggestions would be appreciated.
    Thanks
    Sean

  • How to show all records (instead of unique records) in OBIEE Answers

    I am a newbie of OBIEE and have below question.
    The fact table has 3 fields:
    ID (Primary Key)
    Status (either 'open' or 'close')
    Amount
    There are 100 records in the fact table. When I drag the column Status into the Answers, the result returned is 2 records, 'open' and 'close'. Thus, seems Answers always returns unique records only.
    Can I achieve disabling such Answers feature such that all records will be shown? For above example, can the result returned all 100 records of either 'open' or 'close' ??
    Thank you very much.

    Hi,
    OBIEE is an analytical tool, it is there to help people see the value of numeric facts against one or more textual attributes. With that in mind OBIEE will always aggregate to the highest possible level when returning the results to you. In your case the highest level is status. If you include another column wich breaks the data down further then you will see it aggregated at that level. If you want to see individual records then you need to add a column which is unique for each record, usually you can use the column holding the identifier of the row from the source system, generally this is called Integration Id.
    Edit: After reading your post again, just add the ID column in your request and voila.
    Regards,
    Matt
    Edited by: mod100 on 13-Oct-2009 23:39

  • Display all columns but only unique values in one column

    My table looks like this;
    ApprovalKey (PK)
    ApprovalCCN (Links to main table)
    ApprovalName
    ApprovalDate
    ApprovalMsg
    ApprovalResult
    Typical data would look like;
    Key CCN ApprovalName ApprovalDate ApprovalMsg ApprovalResult
    1 1 John Smith 12/12/2014 16:20:22 Testing the message False
    2 1 Andy Brown 12/12/2014 16:20:27 testing the decline False
    3 1 John Smith 12/12/2014 16:20:46 More testing True
    4 1 Andy Brown 12/12/2014 16:25:13 testing True
    5 2 Andy Brown 12/12/2014 16:25:26 testing the accept True
    6 2 John Smith 12/12/2014 16:34:04 testing, 1 2 True
    When I view data from linked table (matched via ApprovalCCN) It should display data from this table but only the latest unique entry from ApprovalName.
    eg, table from above has 4 entries for ApprovalCCN=1 but should only show the following;
    Key CCN ApprovalName ApprovalDate ApprovalMsg ApprovalResult
    3 1 John Smith 12/12/2014 16:20:46 More testing True
    4 1 Andy Brown 12/12/2014 16:25:13 testing True
    Distinct ApprovalName doesn't return all values and I can't seem to get my head around Group By to view all columns
    Any help would be appreciated

    Here is my test data;
    7 30 John Smith 12/12/2014 16:20:22 Testing the message False
    8 30 Andy Brown 12/12/2014 16:20:27 testing the decline False
    9 30 John Smith 12/12/2014 16:20:46 More testing True
    10 30 Andy Brown 12/12/2014 16:25:13 testing True
    20 30 David Jones 12/12/2014 16:25:26 testing False
    21 30 David Jones 12/12/2014 16:34:04 Testing the message True
    25 30 Me 12/12/2014 16:35:05 testing the decline False
    26 28 You 12/12/2014 16:36:05 testing the decline False
    27 28 Me 12/12/2014 16:37:05 testing True
    28 28 John Smith 12/12/2014 16:38:05 testing the decline False
    29 28 David Jones 12/12/2014 16:39:05 testing the decline False
    30 30 David Jones 14/12/2014 17:39:44 True
    31 29 David Sawyer 14/12/2014 18:51:06 declining the offer False
    32 29 David Sawyer 14/12/2014 18:51:37 My message False
    33 29 David Sawyer 14/12/2014 18:52:01 another message False
    34 29 David Sawyer 14/12/2014 18:52:16 True
    35 29 David Sawyer 14/12/2014 18:52:25 True
    36 29 David Sawyer 14/12/2014 18:52:34 True
    If ApprovalCCN=30 I get the following;
    10 30 Andy Brown 2014-12-12 16:25:13.000 testing 1 1
    30 30 David Jones 2014-12-14 17:39:44.000 1 2
    9 30 John Smith 2014-12-12 16:20:46.000 More testing 1 1
    25 30 Me 2014-12-12 16:35:05.000 testing the decline 0 1
    All I need is 3 Approved, 1 Declined
    Apologies if I wasn't clear

  • How to View all settings not just unique

    Hi
    I took a backup of the GPO I created and imported it into MSCM. 
    When I look at the report of the settings it only show the Unique settings.  Is there any way to show all the settings contained within the gpo?

    Probably the most straightforward way to get iTunes onto your new computer is to network it with the old one and copy your iTunes folder across. This works fine if you have been using iTunes to completely manage your music and all your songs are in iTunes Music not in different folders. You can also use this method with an external hard drive, you drag the folder from the old computer to the external drive and then from the drive to the new computer. If the songs in your library are not all in the iTunes Music folder you can consolidate them. When you consolidate, any songs in the iTunes Library that are not in the iTunes Music Folder are copied to the Music Folder and the Library is updated to point to those new files. Files already in the iTunes Music Folder have no changes made to them: Copying all your iTunes files to one location - Windows
    Copying the whole folder brings with it the iTunes Music folder and also the iTunes Library (iTunes Library.itl in Windows) database file which holds all the information about your songs (Playlists, Ratings, Play Counts, Last Played, Date Added, etc). You'll get more information including the Folder/File structure in this article: What are the iTunes library files?
    When you copy the iTunes folder make sure you put it into the same location on the new computer. This has to be the exact same place, on a PC this is \Documents and Settings\Username\My Documents\My Music\. When you open iTunes on the new computer it will be the same as on the original one Songs, Playlists, Play Counts, Ratings etc. When I moved iTunes a while ago for my daughter I was also using the same version of iTunes, not sure how important that is but it's probably worth keeping them the same.
    If you have an iPod it can be used as an external drive and you can move the iTunes folder onto it: How to use your iPod to move your music to a new computer

  • Shape retrieval; finding all polygons in a huge grid;dynamic grid

    Hi.
    1) Is it possible to find (fast) all shapes (eg. polygons) in huge 2D grid? and if yes how can I do it? or do I have to cluster (or sort) my shapes first to make the search fast?
    2)Is it possible to define a dynamic Grid
    not like
    SDO_DIM_ARRAY( -- 20X20 grid
    SDO_DIM_ELEMENT('X', 0, 20, 0.005),
    SDO_DIM_ELEMENT('Y', 0, 20, 0.005)
    but sthing like
    SDO_DIM_ARRAY( SDO_DIM_ELEMENT('X', 0, infinit, 0.05), SDO_DIM_ELEMENT('Y', 0, infinit, 0.05)
    thx

    no i am searching for something I haven't found neither in Oracle Spatial nor in Oracle spatial topology and network... documentation.
    Here is what I have:
    CREATE TABLE graphs ( id NUMBER PRIMARY KEY, name VARCHAR2(32), shape SDO_GEOMETRY, geom_id NUMBER);
    INSERT INTO Graphs VALUES( 1, 'OBJECT 1', SDO_GEOMETRY(
    2006, -- Multline string, 2 dimensions (X,Y),
    NULL, NULL,
    SDO_ELEM_INFO_ARRAY(1,1,8), SDO_ORDINATE_ARRAY(280,275, 208,168, 208,381, 280,275, 459,276, 90,168, 90,381)), 14);
    INSERT INTO Graphs VALUES(2, 'OBJECT 2',SDO_GEOMETRY(2006,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1,6), SDO_ORDINATE_ARRAY(15,17,10,16, 20,38, 28,27, 459,276, 90,168)), 15);
    INSERT INTO user_sdo_geom_metadata(TABLE_NAME,COLUMN_NAME,DIMINFO,SRID)VALUES('Graphs','shape',SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', 0, 600, 0.05),SDO_DIM_ELEMENT('Y', 0, 600,0.05)),NULL);
    CREATE INDEX Graphs_spatial_idx ON Graphs(shape) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    If I would like to know if another Multiline- object (geometry2) with the coordinates 280,275, 208,168, 208,381 is in "object 1" anywhere in my table I can use something like SDO_COVERS(geometry1, geometry2);
    AND NOW here is my problem. Supposed I don 't have the coordinates of geometry2 but an equal Multiline (equal in considering the shape for example like 180,175, 108,68, 108,281). Is there a way to search over all my geometrys in my table if geometry2 COVERS IN ANY WAY (any direction) the geometry in the table. I could code the problem in java but I would like to know if Oracle Spatial or Topology network has functions that support subgraph search.

  • Howto check all tables if have unique key

    I need to check all tables if they have unique key. If they do not i must print it.
    How can i make this in PL/SQL
    regards

    But dba_constraints is not storing the information when i establish a unique constraint by creating unique index.
    SQL> create table t as select level no from dual connect by level <= 10
      2  /
    Table created.
    SQL> create unique index t_idx on t(no)
      2  /
    Index created.
    SQL> select distinct table_name
      2    from user_indexes
      3   where uniqueness = 'UNIQUE'
      4     and table_name = 'T'
      5  /
    TABLE_NAME
    T
    SQL> select * from dba_constraints where constraint_type = 'U' and table_name = 'T'
      2  /
    no rows selected
    SQL> select * from dba_constraints where table_name = 'T'
      2  /
    no rows selected
    SQL> select * from user_constraints where table_name = 'T'
      2  /
    no rows selected
    SQL>But on the other hand user_indexes has it in all case
    SQL> drop table t
      2  /
    Table dropped.
    SQL> create table t(no number unique)
      2  /
    Table created.
    SQL> select distinct table_name
      2    from user_indexes
      3   where uniqueness = 'UNIQUE'
      4     and table_name = 'T'
      5  /
    TABLE_NAME
    T
    SQL> select * from dba_constraints where table_name = 'T'
      2  /
    OWNER                          CONSTRAINT_NAME                C TABLE_NAME                     SEARCH_CONDITION
                            R_OWNER                        R_CONSTRAINT_NAME              DELETE_RU
    STATUS   DEFERRABLE     DEFERRED  VALIDATED     GENERATED      BAD RELY LAST_CHAN INDEX_OWNER            INDEX_NAME                     INVALID VIEW_R
    ELATED
    SYSADM                         SYS_C00391103                  U T
    ENABLED  NOT DEFERRABLE IMMEDIATE VALIDATED     GENERATED NAME          02-SEP-08 SYSADM                 SYS_C00391103Thanks,
    Karthick.

  • Unique ID during upload through WebADI integrator

    Hi All,
    Is there any unique ID generated for each upload through a custom Integrator (similar to fnd_global.conc_request_id for concurrent programs)?
    Thanks,
    Sumanth

    JE,
    Normally we use row id or integration id for this, we populate this value in the external id field (for the records created manually) so that we can do bulk update. My personal experience is row id's are more reliable than integration id's and it has always worked for me :) (my technical team also prefers to use the row id for WS as this value cannot be changed). What kind of linking problem did your people face by using row id?
    If you are looking for some other unique single value identifier, I dont think any other than row id, integration id and external unique id exists. Else you need to go with “On Demand predefined fields” option (First Name, Last Name, Email, Work Phone # for contact records).

  • Parallel Processing in ODI with Unique Requirement

    Hi All,
    I have a unique requirement. I have a scenerio which i have to run multiple times in parallel with different user inputs.
    Eg Suppose user inputs A,B,C then i have to run the same scenerio 3 times with input filter as A B and C respectively in parallel.
    If user inputs A,B,C, and D then i have to run the same scenerio 4 times with inputs A B C and D in parallel.
    Does any one know a way to achieve this.
    Thanks in advance for your suggestions...
    Regards
    Edited by: 872116 on Jul 12, 2011 11:32 PM

    Hi,
    Take at look at the following 2 articles. Using the concepts outlined in them you should be able to achieve what you are trying to do.
    http://odiexperts.com/interface-parallel-execution-a-new-solution
    http://odiexperts.com/processing-multiple-interface-through-single-package

  • Uniqueness of the array elements

    Hi,
    I've got the 1D array of the DBL values.
    How to quickly check all of they are unique?

    What happens if you're comparing two NaN entries in a numeric array?
    Edit - by which I mean to say that, as usual, altenbach has a pretty good example of this - have a read through the comments here
    CLD

  • Need PlSQL code to find out the column/combination of columns from a given table which will be unique values

    Given a table with some columns and data associated with that. Need to find out a column or a combination of some columns, so that the values or combination of values will be unique in the table.
    The table and number of columns and the columns will be dynamic.
    Can you please help me with the solution?

    f8d0dcea-cdf0-4935-8734-632fe021456c wrote:
    No key is defined in the table.
    Suppose a table contains 20 columns then I need the unique combinations of all columns.
    Example: A table 'Employee' has 4 columns: Emp_No, Emp_Name,Passport_No,Emp_Designation. No key is defined for Employee table. Need to find out which column(single column and combination if columns) have unique values. Like, First check if Emp_No is unique then check Emp_No+Emp_Name is unique, then check if Emp_No+Emp_Name+Passport_No is unique, then check Emp_No+Emp_Name+Passport_No+Emp_Designation is unique.
    Then again try with the combination of Emp_No+Passport_No and so on. In this way I need to find out all the combinations having unique values.
    As Paul says, that will be a waste of time, as it will taken a lot of processing for all the possibilities, checking all the data each time to determine which combinations of columns provide uniqueness.  What happens if someone inserts or deletes some data whilst your doing it?
    You'd be quicker to manually look at the tables, and make an educated guess and then test for uniqueness with a quick query on that guess.

  • Insert / delete fails on unique constraint (order problem)

    Hi dear Kodo team,
    within a transaction, we are deleting a certain jdo object. The deletion is
    undone later (within the same tx), resulting in creating a new object with
    the same contents as the deleted one (gets another oid, of course). In our
    database, there is a unique constraint on two mapped fields of this object.
    Unfortunately, kodo issues the INSERT statement before the DELETE
    statement, thus producing a unique constraint violation.
    Is there a way to influence the statement order? Is there any solution other
    than disabling / deferring this constraint?
    Thanks in advance,
    Contus

    Beside Oracle, we are using our db schema on db platforms that do not
    support deferred constraints. That's why we would like to know if there is
    a way to influence statement order without removing those constraints.
    Thanks,
    Contus
    Alex Roytman wrote:
    In general the best option is to use deferred constraints on all your FK
    and unique constraints. You still get complete referential integrity but
    do not need Kodo to order your statements for you. If you are already
    doing it but still get this error message and you are using Oracle 9.2 it
    seems to be a bug in oracle JDBC. I submitted it to oracle - they accepted
    it and supposedly working on resolution
    "contus" <[email protected]> wrote in message
    news:bulku6$qad$[email protected]..
    Hi dear Kodo team,
    within a transaction, we are deleting a certain jdo object. The deletionis
    undone later (within the same tx), resulting in creating a new object
    with the same contents as the deleted one (gets another oid, of course).
    In our database, there is a unique constraint on two mapped fields of
    thisobject.
    Unfortunately, kodo issues the INSERT statement before the DELETE
    statement, thus producing a unique constraint violation.
    Is there a way to influence the statement order? Is there any solutionother
    than disabling / deferring this constraint?
    Thanks in advance,
    Contus

  • EDK Web Controls - Unique Control IDs

    After following the EDK Web Controls Developer Guide and making all the control IDs unique by appending the PortletID, the LinkButton controls in the portlet lose their OnClick Event Handlers.
    The portlet works perfectly when not modifying the ControlIDs.
    If I comment out all the portal specific code, modify the ControlIDs, and run in a standard web page, I also lose the Event Handlers.Any suggestions....

    ------- Jonathan Gilbert wrote on 28/01/05 03:34 -------How are you modifying the IDs? By changing the ID property? You can do it this way but you need to be careful when you do it (otherwise the control won't find it's state in the viewstate). I'd recommend changing the ClientID property - this will only affect how it gets rendered on the page, not how ASP.NET treats it.
    Jonathan,
    Here is the code below. I cannot modify the ClientID because the property is read-only.
    privatevoidUniqueControlIDs(Control control)
    foreach(Control ChildControl incontrol.Controls)
    if(ChildControl.ID != null)
    ChildControl.ID += PortletID;
    UniqueControlIDs(ChildControl);
    protectedoverridevoidOnPreRender(EventArgs e)
    base.OnPreRender(e);
    UniqueControlIDs(this.Page);

  • File renaming using lightroom3....  cant get a unique file number?

    I am new to lightroom 3 and i'm in the process of building a catalog of all my photos . To start of on the right foot i thought i'd implement a numbering system with a unique number starting with #00001 followed by date.    I have tried various ways to renumber the pictures in my catalog using the library menu 'rename' etc..    I select a group of files from a folder and then rename using the 'custom feature' from the 'library'.    No matter which way i edit the custom feature, the numbering begins with  #000001 +(date behind) for each folder that i'm renaming from.  I don't want different pictures beginning with #00001 in each folder.   I want all pictures to have unique numbers starting with #000001 ever onwards.      Would be grateful if someone knows the trick!

    If you and a sequence number that will start from 1 and will increment itself automatically spanning multiple import sessions, you need the following file name template:
    <image#>_<date(date_format)>
    With this template if you import, say, 100 images in the first batch, they will be numbered from 1 to 100. The next day imports will contine from 101 upwards.
    Note1: This variable is limited to 5 characters, so it will only go from 00001 to 99999. You cannot get 0000001 (six numbers).
    Note2: This image# is bugged in LR 3.0, so you'll have to wait for LR 3.1 to get corrected or use LR 2.7 meanwhile.
    If you want to simply apply a new file name scheme to all files in your catalog, not caring about future imports, use the following template:
    <sequence#>_<date(date_format)>
    and set the starting number to 1 in the Rename dialog.

  • Validation for Unique Name and Non-AlphaNumeric Characters

    Hi All,
    How to do Unique name and Non-Alpha Numeric Characters Validation?
    Name should be unique and only allow alphanumeric characters.
    Where all validations must be done? In EOImpl or any other file?
    Plz help
    Thanks,
    Sk

    SK
    Here are the steps you need to perform to check duplicate Employee Names need not entered by user.
    First create a VVO in your schema.server package(that of EO) with the following query.Generate both VVOImpl and VVORowImpl file.
    select full_name
    from fwk_tbx_employees
    where full_name =:1Now add this VVO to your VAM means give instance to it.
    Now open the VVOImpl and write below code to execute query based on new name entered by user
        public void initQuery(String name)
          setWhereClauseParams(null); // Always reset
          setWhereClauseParam(0, name);
          executeQuery();
        }Now open Your Entity Expert class and add below method in it
       public boolean isEmployeeNameExists(String name)
         boolean isExists = false;
               // Note that we want to use a cached, declaratively defined VO instead of creating
               // one from a SQL statement which is far less performant.
         EmployeeNameVVOImpl employeeNameVVO =
           (EmployeeNameVVOImpl)findValidationViewObject("EmployeeNameVVO1");
         employeeNameVVO.initQuery(name);
         // We're just doing a simple existance check.  If we don't find a match, return false.
         if (employeeNameVVO.hasNext())
           isExists = true;
         return isExists;
       }Now you need to call this expert class method from setter method of EOImpl for name.so Open your EOImpl file and go to setter method of name
          if ((value != null) || (!("".equals(value.trim()))))
            EmployeeEntityExpert expert = getEmployeeEntityExpert(getOADBTransaction());
            if (!(expert.isEmployeeNameExists(value)))
                throw new OAException("Duplicate Employee Name", OAException.ERROR);
          }Remember to write code above setAttributeInternal.
    Hope it helps!!!!
    Let me know if you have queries in it.
    Thanks
    AJ

Maybe you are looking for

  • I cannot create an account. When I am asked to prove am no robot, I see no phrase or place to put one in

    When I try to set up sync on the desktop, I could not get past the question about not being a robot. There is no clue about what to do. When I click on "next" it says "wrong answer" (or similar phrase). and I cant get past that. Also, both, the iphon

  • Current Opportunity Oracle e-Business Suite DBA

    URGENT!! 3 x Oracle e-Business Suite Database Administrator required working on site for a UK leading Telecoms company in the North West Midlands. As an Oracle e-Business DBA you must have at least 2 years experience with Oracle e-Business suite up t

  • Format GUI components

    Hi, how do you use formattign such that eg,JTextArea might have a sentence with some words italicised or emboldened? Do you have to use HTML tags or java font components would suffice? Cheers

  • Insufficient disk space using server103linux32 on Mac OSX

    I am trying to install Oracle Workshop for Weblogic 10.3 on Mac OSX using the Linux version of the application. After extracting and executing "java -jar installer.jar", the GUI installer opens and appears to run fine, but after the last dialog, I ge

  • How to burn individual collections

    Hi, In photoshop starter edition, once we have made new folders/collections and then tagged the photos, how do we then transfer them to usb stick or cd? We have a collection called photos to develop and need to be ut onto another edia to take in and