Query a single SDO_ORDINATE

Hi all,
I need help trying to query a table for one SDO_ORDINATE set of coordinates.
I have used the below query which gives me all the SDO_ORDINATES...
select *
from table(select a.coverage.sdo_ordinates
from inspection_zone a
where ID = 421198460)
help!!
Thanks.
Fred

If you wanted the first coordinates, you could do something like...
select column_value from (
select rownum r, b.*
from table(
     select a.coverage.sdo_ordinates
     from nspection_zone a
     where ID = 421198460) b)
where r in (1,2)

Similar Messages

  • MSSQL Query/View Single Line Output For Combined Multiple Data Elements - Possible Pivot Table?

    HELLO...
    I hope you experts out there can help me.  Consider the following (2) Tables in MSSQL:
    1. TENDERED --> Primary Key = DATE / DOC_NO / PAYMENT_SEQ_NO
    DATE
    DOC_NO
    PMNT_SEQ_NO
    PAYCODE_TYPE
    AMOUNT
    2. TENDERED_CR_CARD -->Primary Key = DATE / DOC_NO / PAYMENT_SEQ_NO
    DATE
    DOC_NO
    PMNT_SEQ_NO
    CR_CARD_NO_MASKED
    CR_CARD_NAME
    CR_CARD_EXP_DATE
    These two tables are certainly related, based on their Primary Key values.
    Now, consider the following data in those two tables:
    DATE            
    DOC_NO      PMNT_SEQ_NO              
    PAYCODE_TYPE               
    AMOUNT
    03/10/2014         100001 
    1             
    CASH            
    100.00
    03/10/2014         100001 
    2             
    CASH                             
    -9.75
    03/10/2014         100002 
    1             
    CASH                             
    50.00
    03/10/2014         100002 
    2             
    VISA                             
    100.00
    03/10/2014         100002 
    3             
    VISA             
                   250.00
    03/10/2014         100003 
    1             
                            MC
    125.00
    03/10/2014         100003 
    2             
    AMEX           
    75.00
    DATE          
    DOC_NO PMNT_SEQ_NO  CR_CARD_MASKED     
    NAME            
    CR_CARD_EXP
    03/10/2014  100002   2                       4225******801289  
    MARY JONES   2016/08/31
    03/10/2014  100002   3                       4121******637442  
    JOHN DOE      2015/04/30
    03/10/2014  100003   1                       5428******971134  
    MIKE BAKER   2018/09/30
    03/10/2014  100003   2                       3732*****344756    
    LINDA LIU      2017/07/31
    OK...so what we NEED...is a Combined, SINGLE RECORD Audit Report type query. 
    The resulting query should show, based on the Data from above, the SINGLE LINE represented in the Attached Spreadsheet. 
    NOTE...what's important to point out here..is that ONLY the 'CASH' Tender gets "summed"...EACH INDIVIDUAL Credit Card record MUST have its own Field...as represented in the corresponding Columns of the Spreadsheet (i.e. PMT_TYP_1, AMT_1, PMT_TYP_2,
    AMT_2, and so forth).
    PLEASE HELP!  Any suggestions/advice would be most appreciated! 
    Thank You!...Mark

    I would not do this in SQL if I could possibly avoid it.  Instead do it in the front end.
    If you must do it in SQL, this is a dynamic pivot on multiple columns.  Naomi Nosonovsky has a blog at
    http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/dynamic-pivot-on-multiple-columns/ on how to do that.  Look especially at her second example using the claims table.  Of course, you must do some manipulation even before you do the multi-column
    pivot, since you must first combine all the cash entries.
    So one way to do it would be to build a temp table with all the entries you have except the cash entries combined into one payment sequence number.  To do that you may need specifications that are not clear to me from what you have given us.  For
    example, if PMT SEQ 1 is VISA,  PMT SEQ 2 is CASH, PMT SEQ 3 is VISA, PMT SEQ 4 is CASH, and PMT SEQ 5 is VISA, you want to combine the two cash payments.  So they become PMT SEQ 2?  If so, what happens to PMT SEQ 4 - is it left N/A or does
    PMT SEQ 5 become PMT SEQ 4?
    But once you have this temp table with the cash payments combined in the algorithm you need, then you can use Naomi's method to do the multi-column pivot.  Note that Naomi uses the code
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_Name = 'Claims'
    to get the column names from the permanent table Claims.  To get the column names from a temp table use code like the following.  To find the column names in a temp table named #MyTempTable, do
    From tempdb.sys.columns
    Where object_id = OBJECT_ID('#MyTempTable')
    But as I say, if feasible, I would do this in the front end, not in SQL.  T-SQL is a very good language for storing and retrieving data, not so good at formatting it. 
    Tom

  • Convert Oracle SQL query to single column output

    Hello All,
    I need to build the query to have multiple columns in a single column with multiple rows.
    select a.customer_trx_id,a.previous_customer_trx_id
    from ra_customer_trx_all a
    where a.customer_trx_id = :customer_trx_id
    here, a.customer_trx_id and a.previous_customer_trx_id are in two columns. I need to bring them into a single column.
    Say: the above output is
    a.customer_trx_id a.previous_customer_trx_id
    123456 87654
    Need to have single column
    As
    123456
    87654
    Please do the needful.
    Thanks,
    Abdul

    Hi,
    Post your question in [SQL and PL/SQL|http://forums.oracle.com/forums/forum.jspa?forumID=75] forum, you would probably get a better/faster response.
    Regards,
    Hussein

  • Performance of update query for single column vs multiple column

    Hi All,
    I could not find any answer for this, does it ever matter in terms of performance updating single column versus multiple column in a single update query.
    For eg. table consisting of 15 columns, what would be the difference in performance when one column is update in the single query against another update query where 15 columns are updated.
    Please do keep in mind my table columns in actually could be around 150+.
    Thanks for any information provided.

    If updated columns aren´t on where clause , then the only impact of 15 columns will be a increase on redo generation, and a possible chainning row.
    So since the redo is one of the things that have a large impact, the answer is yes.
    The performance will be slower.
    Regards
    Helio Dias.
    http://heliodias.com
    OCE SQL, OCP 9i

  • Joining query with single row result

    dear all,
    i have two tables
    create table item(item_id number primary key,
    item_desc varchar2(200));
    create table item_properties(item_id number references item(item_id),
    property_name varchar2(20),
    property_value varchar2(100));i insert the following records
    insert into items values(1,'CPU');
    insert into item_properties values(1,'RAM','2gb');
    insert into item_properties values(1,'PROCESSOR','2ghz');
    insert into item_properties values(1,'HARDDISK','2ghz');
    commit;now i want a query which produce the following results
    item_id      RAM      PROCESSOR         HARDDISK
    1              2gb        2ghz              2TBHow to generate this result?
    i have create a query but it generate multiple rows, instead i need in a single row like above.
    select i.item_id,p.property_value from items i , item_properties p
    where i.item_id=p.item_id and i.item_id=1;Kind thanks.
    Edited by: Maahjoor on May 7, 2013 12:22 AM

    select i.item_id,
           max(decode(p.property_name,'RAM',p.property_value)) ram,
           max(decode(p.property_name,'PROCESSOR',p.property_value)) processor,
           max(decode(p.property_name,'HARDDISK',p.property_value)) hd
    from items i , item_properties p
    where i.item_id=p.item_id
    and i.item_id=1
    group by i.item_id;Or pivot in 11g
    with details as
    select i.item_id,p.property_name,p.property_value
    from item i , item_properties p
    where i.item_id=p.item_id
    and i.item_id=1
    select *
    from details
    pivot
       max(property_value) for property_name in ('RAM','PROCESSOR','HARDISK')
    );Edited by: jeneesh on May 7, 2013 1:04 PM

  • 2 query in Single excel

    HI All,
    I need the sql query output in Excel sheet.
    We use sqlunload for this.
    But my requirement is to export
    2 sql query in 2 tabs of a single excel sheet.
    Please let m eknow how to process this.
    Thanks,
    Lony

    Any idea how to work on this one?

  • SQL query - return single unique rows

    Hi
    If you have an employee table where employees are listed per department, using SQL, how could you return the names of the employees listed per department on a single unique row?
    Eg - select deptno, first_name from employee
    deptno first_name
    10 Jane
    20 Jack
    10 Joe
    20 Jill
    10 Jacinta
    30 John
    30 Jeffrey
    10 Jackie
    30 Jennifer
    ... etc.
    the return set of the query would look like:
    deptno first_name concat
    10 Jane Joe Jacinta Jackie ..
    20 Jack Jill ..
    30 John Jeffrey Jennifer ..
    Cheers

    Here you go:
    WITH t AS
    (SELECT 10 deptno, 'Jane' first_name FROM dual UNION
    SELECT 20 deptno, 'Jack' first_name FROM dual UNION
    SELECT 10 deptno, 'Joe' first_name FROM dual UNION
    SELECT 20 deptno, 'Jill' first_name FROM dual UNION
    SELECT 10 deptno, 'Jacinta' first_name FROM dual UNION
    SELECT 30 deptno, 'John' first_name FROM dual UNION
    SELECT 30 deptno, 'Jeffrey' first_name FROM dual UNION
    SELECT 10 deptno, 'Jackie' first_name FROM dual UNION
    SELECT 30 deptno, 'Jennifer' first_name FROM dual)
    SELECT   deptno,
             RTRIM(XMLAGG(XMLELEMENT(c, first_name||' ') ).EXTRACT ('//text()'), ' ') names
    FROM     t
    GROUP BY deptno

  • How to find out the maximum value in a Query within single material

    Dear all,
    Im creating a Query on 0SD_C03 where i have to disply Maximum value of a material which is having more that one transaction..
    EX:
    MATERIAL BILLED VALUE
    x with BILLED VALUE 100
    x with BILLED VALUE120
    y with BILLED VALUE 50
    y with  BILLED VALUE 80
    z with BILLED VALUE 50
    z with BILLED VALUE 60
    in a analyser i have to display X with billed value 120 that is max in X material and
    Y with billed value 80 that is max in Y material and
    Z with billed value 60 that is max in Z material
    In a query all the values are summing up. I.e for X its 220 and Y its 130 and Z its110 but we dont want to get total sum value we want individual values and the maximim of those values.......... 
    We are using BW 7.0 version
    Can any one help me out in this
    Thxs in Advance
    Venu

    Venu,
    In your query try creating a formula, with the value of each record as the key figure in the formula.
    In the aggregation tab select maximum in the exception aggregation dropdown and then select material as the reference characteristic
    then when you include material in the rows it will only display the maximum value.
    cheers
    mark

  • How to disable Query for single controls in a Form Applet?

    Hi All,
    this should be so simple, but seems like I don't get it at the moment.
    I have a Form Applet in HI Mode and want to disable the possibility to Query on certain fields. these are Calculated fields and querying will most likely crash the application due to heavy performance impact. They should be for displaying only. How to do that? I have searched for Applet Control User Properties and such stuff but couldn't find one.
    Thx

    Hi Siebelade thanks for your reply,
    in the meantime I managed to do it using a BusComp Field User Property called "DisableSearch". If you set this to "TRUE" for the desired fields, the user will receive an error message when trying to query for these fields.
    Benny

  • Lock record on query for single user

    Is there any way to use the on-lock trigger to lock a particular record as it is simply queried, instead of after a change has been made to it. For instance, if user A is viewing a queried record, and user b attempts to query the same record, then we would display a message to user b stating that the record is unavailable, or simply just skip it. I know that if a field in the current record is altered, forms recognizes the status of the record as 'CHANGED' and will then by default proceed to lock the record until a commit or rollback is issued. However, this is not what we are looking for. I have read a little about this, and I have seen an example through a datablock based upon a stored procedure, a ref cursor select for update statement. (NOTE: we are not basing our datablock on a stored procedure though)
    We have two scenarios that require this type of locking capability. The first simply queries one distinct record, and the second queries a distinct result of records.
    A select for update statement would suffice for the first scenario, i.e. if another user tries to query the same record, their query is denied; however, for the second scenario when two users perform the same query, user a is viewing record #1, and user b's program sees that record #1 is 'locked' and thus proceeds to the next record in the result .
    Any suggestions? Thanks in advance.
    Eric M Weiss

    You don't need to override on-lock you can just call the LOCK_RECORD built-in in POST-QUERY or whatever.

  • Select query for single record

    hi all,
    i am working for script which is letter.
    i had to extract the fields as shown in the code. from two tables i had to extract single record. and pass this values to script.i developed the code. wen i execute the code its going to dump. can any body help me.
    TABLES : VBAK, KNA1.
    PARAMETERS : p_vbeln LIKE vbak-vbeln.
    Data : name like kna1-name1.
    Data: begin of wa_vbak ,
         vbeln(10),
           netwr(15),
           bstdk(8),
           kunnr(10),
           smenr(8),
           end of wa_vbak.
    Data: begin of wa_final,
           vbeln(10),
           netwr(15),
           bstdk(8),
           kunnr(10),
           smenr(8),
           name1(35),
           end of wa_final.
           Select single vbeln
                         netwr
                         bstdk
                         kunnr
                         smenr from vbak
                         into wa_vbak where vbeln = p_vbeln.
        If sy-subrc = 0.
           Select single name1 from kna1 into name  where kunnr  =  wa_vbak-kunnr.
        If sy-subrc = 0.
          Move wa_vbak-vbeln to wa_final-vbeln.
          Move wa_vbak-netwr to wa_final-netwr.
          Move wa_vbak-bstdk to wa_final-bstdk.
          Move wa_vbak-kunnr to wa_final-kunnr.
          Move wa_vbak-smenr to wa_final-smenr.
          Move name to wa_final-name1.
        endif.
        endif.
        write:/10 wa_final-vbeln, 20 wa_final-netwr.
    thanks
    venkat

    Hai,
    Make sure that field names(itab) are same as database tables.
    And also INTO CORRESPONDING FIELDS OF TABLE .
    The modified code is as below:
    TABLES : VBAK, KNA1.
    PARAMETERS : p_vbeln LIKE vbak-vbeln.
    Data : name like kna1-name1.
    Data: begin of wa_vbak ,
    vbeln(10),
    netwr(15),
    bstdk(8),
    kunnr(10),
    smenr(8),
    end of wa_vbak.
    Data: begin of wa_final,
    vbeln(10),
    netwr(15),
    bstdk(8),
    kunnr(10),
    smenr(8),
    name1(35),
    end of wa_final.
    Data:
      T_wa_vbak like standard table of  wa_vbak.
    Select single vbeln
    netwr
    bstdk
    kunnr
    smenr from vbak
    into <b>CORRESPONDING FIELDS OF TABLE T_</b>wa_vbak where vbeln = p_vbeln.
    If sy-subrc = 0.
    Select single name1 from kna1 into name where kunnr = wa_vbak-kunnr.
    If sy-subrc = 0.
    Move wa_vbak-vbeln to wa_final-vbeln.
    Move wa_vbak-netwr to wa_final-netwr.
    Move wa_vbak-bstdk to wa_final-bstdk.
    Move wa_vbak-kunnr to wa_final-kunnr.
    Move wa_vbak-smenr to wa_final-smenr.
    Move name to wa_final-name1.
    endif.
    endif.
    write:/10 wa_final-vbeln, 20 wa_final-netwr.
    Regards,
    Rama chary.Pammi

  • How do I query a single record from a database?

    I need to retrieve a record from a specific table within a .mdb file using it's name or primary key to search.
    I have the database connectivity toolkit(LV7.1) and have not been able to figure this out.
    Any help would be greatly appreciated.
    Jim

    Bdougr,
    Thanks for the reply, but it's a little over my head.
    Maybe I should give some more info. We store test parameters in a MSAccess database.
    Using LabView 7.1, I would like to retrieve a "record" or row based on a primary key (our part#)from a .mdb file and then use that data as my test parameters, I do not want to use the row# or record#. The database contains several tables so I also need to get to the specific table.
    I have figured out how to get a "feild" or the hole thing but I don't know how to return just one specific row.
    I have tried Select data, Fetch, Fetch all and Execute query VIs without success. Would "Execute query" be the way to do it? If so, what would be the correct SQL syntax to retrieve a record base on its primary key?
    Jim

  • Query - Sharing single Input/output  FRS  across multiple CMS Cluster

    Hi,
    I have two BOE XI R2 SP3 servers on windows 2003r2 x64 which are with one BOE clustered, sharing file repository (FRS) on common NAS storage folders. Objective is to vertically scale BOE servers by adding more clusters on these two BOE servers. I wish to add few more clusters by adding CMS through CCM wizard option pointing to separate CMS db sachems.
    Can multiple CMS cluster share same FRS component with separate folder structure OR do I have to duplicate each BOE component per cluster basis.
    Regards,
    G.

    Hi
    Thanks for your response.
    Hardware allocated for BOE is only 2 servers, and design is to maintain 3 separate environments( One change should not affect other). We wish to share Production, Testing and support BOE environments on same hardware.
    Only objective of maintaining multiple BOE cluster on same hardware is to provide non inter dependent BOE service to various user groups.
    Suggest needful
    Regards,

  • Single quote in SPARQL query

    Hi,
    I have a SPARQL query with a clause like (?affy gb:bioprocess "3\'-phosphoadenosine" .). Oracle Jena adapter translates it into
    sdo_rdf_match('(?affy <gb#bioprocess> "3\'||chr(39)||'-phosphoadenosine")..., which throws the following error when executing the query:
    java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception: oracle.spatial.rdf.server.TokenMgrError: Lexical error at line 1, column 50. Encountered: "\'" (39), after : "\"3\\"
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 169
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 35
    ORA-06512: at line 4
    What does Oracle Jena adapter expect if the SPARQL query has single quote in the literal value? Thanks,
    Weihua

    Hi,
    What is your database version?
    Could you list exactly the literal value you want to query? Please ignore any escapes. Is it as follows?
    3'-phosphoadenosine
    Thanks,
    Zhe

  • How to find the number of hits on a single query

    how to get the information for number of hits on a single query on single day in BI system,
    Regards
    Kumar..

    Following links might help you
    Re: BEx Query is executed how many times???
    Number of times a Query is Run

Maybe you are looking for

  • Songs not being played on my ipod

    After my dad recently downloaded Queen's platinuim collection ablum from itunes, my sister and i decided that we also wanted to listen to it, after updating both ipods with the album, my sisters will play the songs & mine will not. anybody have any i

  • Acrobat v9.5: Insufficient data for an image

    Hi, There are several cases where I have scanned in a document on a Konica Minolta c203 or c451 and have been unable to open the file in Acrobat v9.5.  The document fails to open with "Insufficient data for an image" error. I'm using Windows XP sp3. 

  • Unable to delete line item in Sales Quotation

    Dear Experts, We have a scenario, where in on creation of Sales Quote, system triggers Production Order. We process the order further, perform GI against Order for components and perform GR against the Prod Order. Now if business decides to drop this

  • Workflow Authorization Modules

    Can anyone recommend any good sites or papers or anything on creating WorkFlow Authorization models? We're building a web-based workflow application and are exploring different methods of building a flexible authorization system for different user's,

  • Older document versions disappeared

    I've been keeping a diary in numbers of my diet, and yes, I've been saving it after every entry. We had a power outage yesterday, and the document I've been working with seems to have reverted to the version I first loaded a week ago (created in exce