How to export aggregated geometry to GML

Hi,
I have tried to use TO_GMLGeometry along with sdo_aggr_union and it's failed with following error.
SELECT TO_CHAR(SDO_UTIL.TO_GMLGEOMETRY(sdo_aggr_union(mdsys.sdoaggrtype(aggr_geom,0.5)))) aggr_geom
ERROR at line 1:
ORA-13378: invalid index for element to be extracted
ORA-06512: at "MDSYS.SDO_UTIL", line 50
ORA-06512: at "MDSYS.SDO_UTIL", line 77
ORA-06512: at "MDSYS.SDO_UTIL", line 1539
I could guess some extent, TO_GMLGEOMETRY won't won't work on SDOAGGRTYPE objects. so, any tips or functions..?

Yes, SDO_AGGR_UNION part working fine and I can see output in spool file.
True, SDO_AGGR_UNION output is SDO_GEOMTRY only. Is it any thing to do with "lack of index"(please see first line of error) because it is just transient geometry..
On the first iteration it failed with ORA-13378
ORA-13378: invalid index for element to be extracted
ORA-06512: at "MDSYS.SDO_UTIL", line 50
ORA-06512: at "MDSYS.SDO_UTIL", line 77
ORA-06512: at "MDSYS.SDO_UTIL", line 1539
On the second iteration it failed with ORA-22813
(this time I have put To_CHAR also in parenthesis...)
ERROR at line 1:
ORA-22813: operand value exceeds system limits
It appears to be I have moved a bit again stuck....
My code looks like below...(I have modified the sample from Spatial guide)
SELECT (TO_CHAR(SDO_UTIL.TO_GMLGEOMETRY(sdo_aggr_union(mdsys.sdoaggrtype(aggr_geom,0.5))))) Myaggr_geom
FROM (SELECT sdo_aggr_union(mdsys.sdoaggrtype(aggr_geom,0.5)) aggr_geom
FROM (SELECT sdo_aggr_union(mdsys.sdoaggrtype(aggr_geom,0.5)) aggr_geom
FROM (SELECT sdo_aggr_union(mdsys.sdoaggrtype(aggr_geom,0.5)) aggr_geom
FROM (SELECT sdo_aggr_union(mdsys.sdoaggrtype(geom,0.5)) aggr_geom
FROM geod_counties WHERE state_abrv='TX'
GROUP BY mod(rownum,16)
GROUP BY mod (rownum, 8)
GROUP BY mod (rownum, 4)
GROUP BY mod (rownum, 2)
I am using 10.2.0.3.. It seems to be I hit a known bug related to ORA-22813. But not sure....
Any thoughts from Oracle masters....
Edited by: user498892 on 04-Nov-2008 09:03

Similar Messages

  • How to export a data as an XML file from oracle data base?

    could u pls tell me the step by step procedure for following questions...? how to export a data as an XML file from oracle data base? is it possible? plz tell me itz urgent requirement...
    Thankz in advance
    Bala

    SQL> SELECT * FROM v$version;
    BANNER
    Oracle DATABASE 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS FOR 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    5 rows selected.
    SQL> CREATE OR REPLACE directory utldata AS 'C:\temp';
    Directory created.
    SQL> declare                                                                                                               
      2    doc  DBMS_XMLDOM.DOMDocument;                                                                                       
      3    xdata  XMLTYPE;                                                                                                     
      4                                                                                                                        
      5    CURSOR xmlcur IS                                                                                                    
      6    SELECT xmlelement("Employee",XMLAttributes('http://www.w3.org/2001/XMLSchema' AS "xmlns:xsi",                       
      7                                  'http://www.oracle.com/Employee.xsd' AS "xsi:nonamespaceSchemaLocation")              
      8                              ,xmlelement("EmployeeNumber",e.empno)                                                     
      9                              ,xmlelement("EmployeeName",e.ename)                                                       
    10                              ,xmlelement("Department",xmlelement("DepartmentName",d.dname)                             
    11                                                      ,xmlelement("Location",d.loc)                                     
    12                                         )                                                                              
    13                   )                                                                                                    
    14     FROM   emp e                                                                                                       
    15     ,      dept d                                                                                                      
    16     WHERE  e.DEPTNO=d.DEPTNO;                                                                                          
    17                                                                                                                        
    18  begin                                                                                                                 
    19    OPEN xmlcur;                                                                                                        
    20    FETCH xmlcur INTO xdata;                                                                                            
    21    CLOSE xmlcur;                                                                                                       
    22    doc := DBMS_XMLDOM.NewDOMDocument(xdata);                                                                           
    23    DBMS_XMLDOM.WRITETOFILE(doc, 'UTLDATA/marco.xml');                                                                  
    24  end;                                                                                                                  
    25  /                                                                                                                      
    PL/SQL procedure successfully completed.
    .

  • I'm trying to find out how to export my apple contacts to the Salesforce software and they need to be in a csv format and I don't know if this is possible and how to do it if it is?

    I'm trying to find out how to export my apple contacts to the Salesforce software and they need to be in a csv format and I don't know if this is possible and how to do it if it is?

    I think there are third-party programs which will do that, but you can also do it with Automator:
    See the links in my post, here: https://discussions.apple.com/message/22390873#22390873
    The file or clipboard contents will be in Tab Separated vars, so you'll have to open with a spreadsheet program and save as Comma Separated Vars format.

  • In SSMS after creating the query Report, how to export excel the same report from SSMS

    for Beginners in SSMS after the report is created , how to export the same report to excel, I did try the option to task and export and follow the procedure, this procedure does not export the same report, the one was created, unless I am missing some steps,
    is there a way to do just like we do in SSRS go to solution explorer, and properties and add the Target Server URL or not
    in SSMS, 
    after I save the report it saves in project , can some one please guide me how to do it, and what steps I am doing wrong,
    any help will be great.  I am not technical person, just starting to learn from internet.
    thanks in advance.

    As you have said you are not a technical person try using Import Export wizard.
    Refer this link
    http://www.mssqltips.com/sqlservertutorial/203/simple-way-to-import-data-into-sql-server/
    And another simplest one is to copy the result set from the query window. Right click the result and select "Copy with Headers".
    Regards, RSingh

  • How to export best quality gif animations in flash

    how to export best quality gif animations in flash

    GIF is a color restricted format with on/off support for transparency. There's really no settings you can tweak to output a better GIF. You have a drop-down during GIF sequence export to allow transparency, select the amount of colors (up to 256) and you can choose dither to save a little filespace. The only 2 things in there that really matter are dither and amount of colors used to export.
    If your content is very similar (e.g. not a lot of complex gradients/shadows/etc) and is limited in color use turning down the amount of colors used and dithering is your only option.
    Make sure you're exporting the GIF via "Publish Settings" so you get a single animated GIF and not file->export->movie because this creates a separate sequence of GIF images for each frame.

  • How to export data with column headers in sql server 2008 with bcp command?

    Hi all,
    I want know "how to export data with column headers in sql server 2008 with bcp command", I know how to import data with import and export wizard. when i
    am trying to import data with bcp command data has been copied but column names are not came.
    I am using the below query:-
    EXEC master..xp_cmdshell
    'BCP "SELECT  * FROM   [tempdb].[dbo].[VBAS_ErrorLog] " QUERYOUT "D:\Temp\SQLServer.log" -c -t , -T -S SERVER-A'
    Thanks,
    SAAD.

    Hi All,
    I have done as per your suggestion but here i have face the below problem, in print statment it give correct query, in EXEC ( EXEC master..xp_cmdshell @BCPCMD) it was displayed error message like below
    DECLARE @BCPCMD
    nvarchar(4000)
    DECLARE @BCPCMD1
    nvarchar(4000)
    DECLARE @BCPCMD2
    nvarchar(4000)
    DECLARE @SQLEXPRESS
    varchar(50)
    DECLARE @filepath
    nvarchar(150),@SQLServer
    varchar(50)
    SET @filepath
    = N'"D:\Temp\LDH_SQLErrorlog_'+CAST(YEAR(GETDATE())
    as varchar(4))
    +RIGHT('00'+CAST(MONTH(GETDATE())
    as varchar(2)),2)
    +RIGHT('00'+CAST(DAY(GETDATE())
    as varchar(2)),2)+'.log" '
    Set @SQLServer
    =(SELECT
    @@SERVERNAME)
    SELECT @BCPCMD1
    = '''BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT '
    SELECT @BCPCMD2
    = '-c -t , -T -S '
    + @SQLServer + 
    SET @BCPCMD
    = @BCPCMD1+ @filepath 
    + @BCPCMD2
    Print @BCPCMD
    -- Print out below
    'BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername'
    EXEC
    master..xp_cmdshell
    @BCPCMD
      ''BCP' is not recognized as an internal or external command,
    operable program or batch file.
    NULL
    if i copy the print ourt put like below and excecute the CMD it was working fine, could you please suggest me what is the problem in above query.
    EXEC
    master..xp_cmdshell
    'BCP "SELECT  * FROM  
    [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername '
    Thanks, SAAD.

  • How to EXPORT a concurrent program from one instance to another

    Hi,
    I am new to EBS.
    How to EXPORT a concurrent program from one instance to another. I dont want to use FNDLOAD.
    Is there any other way from where we can export the concurrent program to anothere instance from CLIENT connection server.
    Thanks
    Asis

    Hi;
    What is EBS version? Why you dont use FNDLOAD?
    Pelase see below thread
    Move concurrent program to prod
    Move concurrent program to prod
    Regard
    Helios

  • How to export Tabel? (Exporting and Importing of RFCDES table)

    Hi,
    We are doing system Refresh on qualitysystem,
    I want to export the Tables and reimport them after system refresh
    Tables like: RFCDES
    How can export this table ?
    How to import the table?
    It is very urgent, Please give me the solution as soon as possible
    Note: we are using BRTOOLS
    Points awarded
    Regards,
    Ravi

    Hi Ravi,
    Create a control file like "rfcdes_export.ctl"
    export
    file '/usr/sap/data/export_rfc.dat’
    delete from rfcdes
    select * from rfcdes
    Take the export :
    R3trans -w rfcdes_export.log rfcdes_export.ctl
    Create the control file "rfc_import.ctl"
    import
    file '/usr/sap/data/export_rfc.dat'
    Import it:
    R3trans -w rfc_import.log -u 1268 rfc_import.ctl
    Hope it will help you.
    Best Wishes.
    Kumar

  • How to export photos from photo gallery to my iPad

    How to export photos from photo gallery to my iPad

    I had no trouble finding the "Export" tools in the "File" menu. They are greyed out when no photo is selected, but they are functional after selecting one or more photos.
    I agree that it would be nice to have the "Reveal in Finder" option back, but they probably don't want us mucking about inside the Photos library structure.

  • How to export photos from lap to to ipad

    how to export photos from lap top to ipad,i keep draging them in ipad devise logo,photos jump back in place.if i click on to export in i photo,it only would go to files??????help!!

    Use the photo set up in the iTunes sync
    LN

  • How to export photos from iMac to iPad and iPhone

    How to export photos from iphoto to my iPad and iPhone the easiest way.

    There are a number of methods including:
    Via iTunes and USB cable: iTunes: Syncing photos - Apple Support
    Via Photo Stream: http://support.apple.com/en-us/HT201317
    Via 3rd party app: http://www.photosync-app.com
    Via 3rd party cloud services such as Dropbox

  • How to export photos from one iPad to another

    How to export  photos from one iPad to another

    Sending the photos over WiFi might be the easiest way for you to accomplish this. The Wireless Transfer App should work. You will both have to download the app on your own devices. Read about it here.
    http://www.wirelesstransferapp.com/

  • How to export pictures from my ipad to my computer

    HOW TO EXPORT PHOTOS FROM MY IPAD ?

    How to Transfer Photos from an iPad to a Computer
    http://www.wikihow.com/Transfer-Photos-from-an-iPad-to-a-Computer
    Importing Personal Photos and videos from your iOS device to your computer.
    http://support.apple.com/kb/HT4083
    Also check out the Photo Manager Pro app.
    https://itunes.apple.com/us/app/photo-manager-pro/id393858562
     Cheers, Tom

  • How to export data from a Oracle table to a delimited file?

    I know how to load delimited file into a table, but how to export
    data from a Oracle table to a delimited file?
    Thanks in advance.

    Try looking at this link, it's long but there's three different solutions discussed in it. If you look at Barbara Boehmer's
    solution in her posts in the link below you'll see that she's addressed your concerns with spool files.
    Re: utl_smtp and triggers

  • How to export data from a spread sheet which has multiple work sheets?

    How to export data from a spread sheet which has multiple work sheets to a single text file with fixed length fields?

    Hello s1,
    saving them as CSV will not give a fixed legth output but, as the naming says, a Character Separated Value file.
    Regards
    Marcus

Maybe you are looking for

  • New issue about Album Art

    I sent this e-mail to Apple and was sent back a "follow-up" e-mail a day later that completely disregarded everything I said and didn't answer anything I asked. I figured if I post on this board I could actually get some help since the phone and e-ma

  • Break string using unique query

    Hi I have data as SQL> select  T1.USUARIO, T1.departamento, t1.acao   2    from SIBTB_PERMISSAO  t1   3    where t1.acao in ('SIBPED','SIBCOM','SIBPED','SIBFIN')   4    and t1.usuario = 'umlanton' SQL> / USUARIO              DEPARTAMENTO             

  • Flash CS3 and FLVPlayback

    Hello. Is there a way to dynamically instantiate a FLVPlayback with ActionScript 3? I imported fl.video.FLVPlayback and Flash accused not knowing this class... Thanks, Ian L.

  • Command key not working right in several applications

    All of a sudden, some functions are not working right, i.e., in PhotoShop when I select the Zoom key I get a minus rather than the usual plus. In Date and Time, I started getting a 24 hour clock. If I go there in System Prefs and change to 24 hour cl

  • Unable to mark mail as read....

    For the past day now my mail messages to one of my IMAP accounts refuse to be marked as "read". Reading them/marking them/nothing seems to work. If I read the messages through my iPhone the iPhone recognizes them as new unread messages but marks them