Bad result SDO_DISTANCE?

I try to use SDO_DISTANCE to calculate the distance of the flight from Dallas to Frankfurt. According to various Internet sites, this distance is about 8 266 kilometers.

The following query gives 11 618 km. I made sure the details are correct.

Select SDO_GEOM. () SDO_DISTANCE

MDSYS. SDO_GEOMETRY)

2001

4326

MDSYS. SDO_POINT (32.7801300,-96.8004511, NULL)

NULL

NULL

)

MDSYS. SDO_GEOMETRY)

2001

4326

MDSYS. SDO_POINT (50.121212,8.6365638, NULL)

NULL

NULL

)

1

'unit = KM'

) As a double dist_in_km;

No idea why the result is different?

Christoph,

MDSYS. SDO_POINT parameters are longitude then latitude. So when you change them all about you will get the answer you expect.

Select SDO_GEOM. () SDO_DISTANCE

MDSYS. SDO_GEOMETRY)

2001

4326

MDSYS. SDO_POINT (-96.8004511,32.7801300, NULL)

NULL

NULL

)

MDSYS. SDO_GEOMETRY)

2001

4326

MDSYS. SDO_POINT (8.6365638,50.121212, NULL)

NULL

NULL

)

1

'unit = KM'

) AS the double dist_in_km

Kind regards.

Ivan

Tags: Database

Similar Questions

  • BAD RESULTS WITH OUTER JOINS AND TABLES WITH A CHECK CONSTRAINT

    HII All,
    Could any such a me when we encounter this bug? Please help me with a simple example so that I can search for them in my PB.


    Bug:-8447623

    Bug / / Desc: BAD RESULTS WITH OUTER JOINS AND TABLES WITH a CHECK CONSTRAINT


    I ran the outer joins with check queries constraint 11G 11.1.0.7.0 and 10 g 2, but the result is the same. Need to know the scenario where I will face this bug of your experts and people who have already experienced this bug.


    Version: -.
    SQL> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE    11.1.0.7.0      Production
    TNS for Solaris: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production

    Why do you not use the description of the bug test case in Metalink (we obviously can't post it here because it would violate the copyright of Metalink)? Your test case is not a candidate for the elimination of the join, so he did not have the bug.

    Have you really read the description of the bug in Metalink rather than just looking at the title of the bug? The bug itself is quite clear that a query plan that involves the elimination of the join is a necessary condition. The title of bug nothing will never tell the whole story.

    If you try to work through a few tens of thousands of bugs in 11.1.0.7, of which many are not published, trying to determine whether your application would be affected by the bug? Wouldn't be order of magnitude easier to upgrade the application to 11.1.0.7 in a test environment and test the application to see what, if anything, breaks? Understand that the vast majority of the problems that people experience during an upgrade are not the result of bugs - they are the result of changes in behaviour documented as changes in query plans. And among those who encounter bugs, a relatively large fraction of the new variety. Even if you have completed the Herculean task of verifying each bug on your code base, which would not significantly easier upgrade. In addition, at the time wherever you actually performed this analysis, Oracle reportedly released 3 or 4 new versions.

    And at this stage would be unwise to consider an upgrade to 11.2?

    Justin

  • bad results for the search for context on the empty element tags

    I use Oracle DBMS 11.1 and 11.2 and created an index on an XML column context (article group: PATH_SECTION_GROUP).
    When you enter a query like

    SELECT count (*) FROM my_table t WHERE contains (t.co_xml,'hasPath(/tag1/tag2)') > 0

    I get bad results if tag2 is an empty element tag (< tag2 / >) that appears somewhere in the
    XML instance, but is NOT directly under tag1.

    For example, the following XML instance is (but shouldn't!):

    < a >
    blah blah < tag3 > < tag1 > < / tag3 > < / tag1 >
    blah < tag4 > < tag2 / > < / tag4 >
    < /a >

    This seems to happen only for the empty element tags. Is this a known bug and does anyone know of a workaround?

    Thank you in advance for your help!
    Roman

    Like you, I've been looking in the wrong places, bug of thought, rather than documented behavior. Finally, I came across the following excerpt from the next section of the documentation on haspath in Oracle text reference.

    http://download.Oracle.com/docs/CD/B28359_01/text.111/b28304/cqoper.htm#i997393

    Limits

    Because of the way in which XML data section are saved, false match may appear with XML sections that are completely empty as follows:

    
    

    A query of HASPATH(A/B/E) or HASPATH(A/D/C) falsely corresponds to this document. This type of fake correspondent can be avoided by inserting some text between the empty tags.

  • Integrated Oracle database reports space usage out bad results?

    Hi members,

    I use GC 11g OEM. I created a group with 6-7 members.

    I generated built-in reports "Area of database using Oracle (Group)".

    -J' I note the sum of the current size (GB) / section "Use of space allocated by database" is equal to allocated (GB) / section "use of the current Cumulative space '... I consider that the data are correct. Current size allocated: 2, 3 to and used size to 1.8.

    Good news... BUT the picture is FAKE! and does not match this amount:
    On the chart allocated size (GB) is equal to 2 TB and used size (GB) is equal to 1.6 TB

    question 1: why such a difference?

    -Use of space allocated by database:
    Current database average maximum minimum
    Size (GB) used for free (GB) (GB) used (%) Size (GB) used for free (GB) (GB) used (%) Size (GB) used for free (GB) (GB) used (%) Size (GB) used for free (GB) (GB) used (%)
    INSTANCE1. PRD 1,085.77 895.14 190,63 82.44 898.63 1 085,67 187,04 82.77 898.63 1 085,67 187,04 82.77 898.63 1 085,67 187,04 82.77
    INSTANCE2. PRD 245.14 190.44 54.7 77,69 238,58 183.1 55,48 76,75 238,58 183.1 55,48 76,75 238,58 183.1 55,48 76,75

    2nd question: results are BAD = > section/size (gb) current is superior to section/size (gb) maximum?
    How to explain?

    Thanks for your comments.

    Best regards
    Guillaume

    Hi William,.

    1 - my diagram of db group is, with the correct values. Why it's different in your case I don't know. You do not have the latest installed SGD patches?
    2. same here. I some cases, max db size > current size, but it doesn't really bother me, since I barely use this report. You can check the calculation to help to create it as an option on the report of the "space of database using Oracle (Group)"

    Eric

  • getting bad results with a query

    I have a column with the VARCHAR2 data type name (2) into a table and another table with a column named OFFICER_ZONE with the VARCHAR2 data type (1). What I'm trying to do is to compare these data and then insert it in the second table. But before you insert the data, if the AREA is equal to a number in double digits with a zero in front of her, then I need to CUT 0. If the BOX has a number greater than 9, then I have just these values to NULL. With the query below, I get the upper to 9 zones to be null, which is correct, but I also have those who are the two numbers with a zero not significant, which is not correct.

    For example:
    Area
    1
    2
    5
    07
    15
    19
    14
    6
    02
    d
    c
    e
    b

    Results:
    Bad area: 07
    Bad box: 15
    Bad area: 19
    Bad box: 14
    Bad area: 02

          --ZONE BAD DATA
          IF CR.ZONE NOT IN ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u',
              'v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
              '0','1','2','3','4','5','6','7','8','9')
          THEN
              V_OFFICER_ZONE := NULL; 
              DBMS_OUTPUT.PUT_LINE('ZONE NOT VALID:'||CR.LOCCASENUM||CR.ZONE);
              insert into pursuits.pursuit_exception(case_number,table_name,error_message)
              values(cr.loccasenum,'PURSUIT','Bad Zone: '||v_officer_zone||','||cr.zone);
          ELSE
              V_OFFICER_ZONE := TRIM(LEADING 0 FROM CR.ZONE);
          END IF;
    with t as (
               select '1' zone from dual union all
               select '2' from dual union all
               select '5' from dual union all
               select '07' from dual union all
               select '15' from dual union all
               select '19' from dual union all
               select '14' from dual union all
               select '6' from dual union all
               select '02' from dual union all
               select '0' from dual union all
               select '00' from dual union all
               select 'd' from dual union all
               select 'c' from dual union all
               select 'e' from dual union all
               select 'b' from dual
              )
    select  zone,
            case
              when length(zone) = 1
                then zone
              when zone between '00' and '09'
                then substr(zone,2)
              else null
            end officer_zone
      from  t
    /
    
    ZONE OFFICER_ZONE
    ---- ------------
    1    1
    2    2
    5    5
    07   7
    15
    19
    14
    6    6
    02   2
    0    0
    00   0
    
    ZONE OFFICER_ZONE
    ---- ------------
    d    d
    c    c
    e    e
    b    b
    
    15 rows selected.
    
    SQL> 
    

    SY.

  • Bad results value amplitude and phase

    I try to add two Phasers of tension and to get incorrect when simulated results on Multisim using the frequency unique AC analysis. I changed the amplitudes of analysis AC from both sources to their respective values of 20 and 15 volts. The result of the addition should be size = 25 volts peak and phase = 66.87 degrees, which does not match results of Multisim. What I am doing wrong?

    Thank you in advance.

    You must click twice on the fickle source V1 and V2 and the "AC size' and the 'magnitude of AC Phase', change the settings.

    Also, depending on your preference, select Options of Simulation global preference, time = 0 if you want the right to shift to change phase or left, you can configure it here.  This setting affects your calculation of phase.

  • Bad result in match pattern

    Hi, I want to extract the space (sometimes! # "etc.) of" @020 12345' using the model equiv function.»

    When I used [\s!# ""] as a regular expression, the result "20".

    Why my expression is not worked and can offer you a more appropriate term?

    labmaster

    *) Was attached is the example of VI in LV2009

    Your channel indicator is set to hexadecimal display. 0 x 20 is a space, right?

  • Windows 7 and 8.1 Windows sfc/scannow - bad results - how to fix?

    I ran sfc/scannow on both my Office Windows 7 & my laptop running Windows 8.1 & both concluded with the same question.

    "Windows resource protection found corrupt files but was unable to fix some of them. Details are provided in the CBS.log C:\Windows\Logs\CBS\CBS.log journal"

     
    I learned that the only way to view this log C:\Windows\Logs\CBS.log
    is to:
     
    Click on start Orb > type cmd in the search box
    · Right click on cmd in the results above > click on run as administrator
    · At the prompt, type notepad c:\windows\logs\cbs\cbs.log, and then press ENTER.
     
    (1.) I'm a beginner at all this, I've never done this before, to take it SLOW! How can we determine which components are corrupt in the CBS.log newspaper?
     
    2.) how I would fix the corruption?
     
    (3.) if it helps any, I own the Microsoft Operating for two Windows 7 installation disk and Windows 8.1 what should I do now?
     
    4.) is this CBS.log safe to share with all the tech staff? Are there private users identifiable, information of web surfing or IP address included in the CBS.log newspaper?
     

    Thank you for your time.

    Lexx

    Hi Lexx

    Open again (as an administrator) command prompt and type:

    findstr/c: "[SR]" %windir%\Logs\CBS\CBS.log > '% userprofile%\Desktop\sfcdetails.txt '.

    Copy the above and right-click near the blinking cursor, which will stick above, and then press ENTER.  This will open the CBS.  When you see "Cannot repair" you will also see the file, he can not fix it in quotes like this "file."

    If it is a recent phenomenon which is about May 13 then it may be a corrupt problem with an update. See this thread and find out what thread and post by Canadian http://answers.microsoft.com/en-us/windows/forum/windows_7-system/sfc-cannot-fix-corrupted-files-in-windows-7/f798f377-126c-47ff-bb16-ef5e0dddb5be

    It is precisely KB3022345

    Any computer windows 7, which had the Windows installed KB3022345 update will produce the message of irreparable corrupted system files.

    1. Control Panel, uninstall a program, view installed updates.
    2. WAIT a long time until you see the green bar at the top to make his trip
    3. In the search box, type KB3022345
    4. When it happens, uninstall it.
    5. Close the window
    6. Begin globe, all programs, Windows Update, check the updates.
    7. When he finally find KB3022345, right-click, choose hide.
    8. Rerun the SFC and you will find no problems
  • Bad results using the scientific calculator

    When you use the scientific calculator of Wondows 7, when I type 126/(3.6*6.48), I get a wrong result: 23.328. When I use Excel to do the same, I get the correct result: 5.40. Any idea?

    I tried this using the scientific calculator and got the correct results, enter the numbers exactly how you wrote them and then hit equal.

  • Acrobat DC more bad results of the marking of Word 2010

    Does using Acrobat DC and Word 2010 usually produced marking poor results? Everything gets the tag, but 95% of the labels are incorrect and role mapping is in every sense (title 1 title [final paragraph, text body mapped to title 2, etc.). Fortunately, lists and tables come out well. The results were not significantly different between a Word well formatted, built from a solid model structure or file Word a bit chaotic, riddled with direct formatting.

    I am relatively new to mark the PDF files for accessibility, and I wonder if I would get better results by using Word 2010 with Acrobat X or XI or Word 2013 2016 with Acrobat DC. My goal is to have structured accessible PDF files without the need of treatment of syndrome of carpal for my hands.

    Yikes! Certainly worth a try a newer version of Word to see if you get the best results, although I use Word 2010 and 2015 and have not noticed a huge difference. A rate of 20% on average, cleaning is a reasonable expectation, IMHO.

  • Bad result in a left outer join in 12.1.0.2

    Hallo,

    We discovered a strange behaviour in a query. The query provides values in a column of outer join where there is no corresponding value in the table is attached to the outside.

    When you expand this request by the "ORDER BY" then this query gives the correct result.

    Example:

    SQL > desc tb_a
    Name                                Null?    Typ
    -------------------------------------------- ----------------------------
    ID NOT NULL NUMBER (19)

    SQL > desc tb_b
    Name                                Null?    Typ
    -------------------------------------------- ----------------------------
    CLOSED NOT NULL NUMBER (1)
    ID NOT NULL NUMBER (19)

    CCS_APPLICATION@icw01> select * from tb_a where id in (4148,4141,4195);

    ID
    ----------
    4148
    4141
    4195

    CCS_APPLICATION@icw01> select * from tb_b where id in (4148,4141,4195);

    INTERNAL ID
    ---------- ----------
    4148 0

    CCS_APPLICATION@icw01> SELECT
    2      b.id                            AS b_id,
    3      a.id                            AS a_id,
    4 b.closed AS b_closed
    5
    6 tb_a a
    7 LEFT OUTER JOIN tb_b b ON a.id = b.id
    8 WHERE a.id IN (4148, 4195, 4141)
    9 ORDER BY ASC a.id
    10;

    B_ID ALLOCATION A_ID B_CLOSED
    ---------- ---------- ----------
    4141
    4148 4148 0
    4195

    CCS_APPLICATION@icw01> SELECT
    2      b.id                            AS b_id,
    3      a.id                            AS a_id,
    4 b.closed AS b_closed
    5
    6 tb_a a
    7 LEFT OUTER JOIN tb_b b ON a.id = b.id
    8 WHERE a.id IN (4148, 4195, 4141)
    9 - ORDER BY ASC a.id
    10;

    B_ID ALLOCATION A_ID B_CLOSED
    ---------- ---------- ----------
    4148 4148 0
    4141 4141
    4195 4195

    instance parameter:

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    compatible string 12.1.0.2.0

    optimizer_features_enable string 12.1.0.2

    After ""alter system set optimizer_features_enable = ' 11.2.0.4 ';"  the query provides the correct result in both cases (ordered and unordered).

    Now the final question: is this a bug?

    1480970 wrote:

    Hallo!  Yes, I searched the Support of Oracle. I found some similar entries, but not an exact match. To fix some issues

    with 12.1.0.2.

    There is another interesting clue when look you on the execution plan:

    Note

    -----

    -the dynamic statistics used: dynamic sampling (level = 2)

    - This is an adaptation plan

    We have disabled (= FALSE) optimizer_adaptive_features and the query provides the correct values.

    This could be a solution for us.

    Looks like a pretty tight match for bug 18430870, even if it affects the two 12.1.0.1 and 12.1.0.2, which contradicts the Martin trial against 12.1.0.1.

    The description of the bug mentions disabling "_projection_pushdown" (set to false) should also be a viable solution, perhaps if you want to give that a try and see if it is a different bug or not.

    There are also a number of one-time fixes already available for download, maybe your version / platform is already covered, if the bug applies.

    Randolf

  • LEFTOUTER join querry which gives bad result

    Hello

    I have tables like below.when I perform a left outer join issue IDs and startdate he gives invalid results.when I write in request

    It does not correct result because there is no data for 16 jan. It should give no results. But it shows all records. How do I solve this problem

    SQL:

    Select a.id, a.date, b.val, a.tot, b.net, b.cre

    FROM table1 a

    join table2 b left

    "on a.id = b.id and a.date = b. and a.date ='02-Feb-2014."

    In the tables below contains no data for the month of February but still im getting the incorrect data. He must not returnany files right?

    Table1:

    IDDateValtot
    1January 1, 1319
    22 January 1338
    33 January 1347
    4January 4, 1356
    55 January 1365

    Table2:

    IDDateNETCRE
    1January 1, 1319
    213 January 1338
    33 January 1347
    4January 4, 1356
    55 January 1365

    "It should not returnany files right?

    Wrong, there is no where clause so it should return all the records in a padded with NULL values for b.

  • view inline values, which gives bad result...

    I saw a123 table with data below...


    GRANTAMOUNTDRCR
    112341000D
    212345000C
    3123452000C
    4123457000D



    Now I want below o/p of the table of the a123


    GRANTBALANCE
    1234-4000
    12345-5000

    To do this, I wrote below the query but its appropriate result not give...

    Select grant, credit-debit balance of)

    Select grant, sum (debit) Debit, sum (credit) credit of)

    Select grant,

    Drcr case when 'C' THEN amount *-1 Else NULL END in the form of credit.

    Drcr case when had ' then amount end otherwise null flow

    from a123)

    Grant group);

    top query results are below...

    GRANTBALANCE
    112346000
    2123459000

    Please help me on this thanks...

    Pretty obvious what is wrong:

    you convert credit figures in negative numbers with the case statement

    If you have

    1 1234 1000 D
    2 1234 -5000 C
    3 12345 -2000 C
    4 12345 7000 D

    and after that you are subtracting these figures of your throughput numbers.

    Therefore, do not convert negative credits before subtracting the or if you want to make negativ, then you must add them.

    1000 + 5000 =-4000

    1000-5000 = 6000

    HTH

  • Text index CONTEXT Oracle which gives bad results!

    Expert Oracle Text,

    I'm on Oracle 11.2.0.2 on Solaris 10 and have implemented the Oracle text features using the CONTEXT index type, and I'm getting a few problems in. I have a need for research with joker as % and giving the wrong exit. Here's the scenario where I get incorrect results:
     
    
    --creating preferences etc 
    exec   ctxsys.ctx_ddl.create_preference ('cust_lexer', 'BASIC_LEXER'); 
    exec   ctxsys.ctx_ddl.set_attribute ('cust_lexer', 'base_letter', 'YES'); -- removes diacritics 
    exec   ctxsys.ctx_ddl.create_preference ('cust_wl', 'BASIC_WORDLIST') 
    exec   ctxsys.ctx_ddl.set_attribute ;    ('cust_wl', 'SUBSTRING_INDEX', 'true'); 
    
    --table set up 
    CREATE TABLE TEST_USER 
    ( 
      FULL_NAME  VARCHAR2(64 CHAR)                  NOT NULL, 
      LAST_NAME  VARCHAR2(64 CHAR)                  NOT NULL 
    ); 
    
    
    CREATE INDEX TEST_USER_IDX5 ON TEST_USER 
    (FULL_NAME) 
    INDEXTYPE IS CTXSYS.CONTEXT 
    PARAMETERS('LEXER cust_lexer WORDLIST cust_wl SYNC (ON COMMIT)'); 
    
    --data set up 
    Insert into TEST_USER 
       (FULL_NAME, LAST_NAME) 
    Values 
       ('Supervisor upervisor', 'upervisor'); 
    Insert into TEST_USER 
       (FULL_NAME, LAST_NAME) 
    Values 
       ('JOSEPH WILSON', 'WILSON'); 
    Insert into TEST_USER 
       (FULL_NAME, LAST_NAME) 
    Values 
       ('CHRISTOPHER Phil', 'TAYLOR'); 
    Insert into TEST_USER 
       (FULL_NAME, LAST_NAME) 
    Values 
       ('PAUL HERNANDEZ', 'HERNANDEZ'); 
    Insert into TEST_USER 
       (FULL_NAME, LAST_NAME) 
    Values 
       ('Betty Jipes', 'Jones'); 
    Insert into TEST_USER 
       (FULL_NAME, LAST_NAME) 
    Values 
       ('One Anna', 'Anna'); 
    Insert into TEST_USER 
       (FULL_NAME, LAST_NAME) 
    Values 
       ('Three Anna', 'Anna'); 
    Insert into TEST_USER 
       (FULL_NAME, LAST_NAME) 
    Values 
       ('Two Anna', 'Anna'); 
    Insert into TEST_USER 
       (FULL_NAME, LAST_NAME) 
    Values 
       ('Four Anna', 'Anna'); 
    Insert into TEST_USER 
       (FULL_NAME, LAST_NAME) 
    Values 
       ('Gary Barrow', 'Barrow'); 
    COMMIT; 
    
    --query using CONTAINS which gives WRONG output - because out intention is to return only those strings that START WITH the letter P but it returns another string that has P not at the starting!! 
    
    SQL> select full_name from test_user where contains(full_name,'P%')>0; 
    
    FULL_NAME 
    ---------------------------------------------------------------- 
    PAUL HERNANDEZ 
    CHRISTOPHER Phil 
    
    -- I need output as follows in which the second value is not returned...meaning 'CHRISTOPHER Phil' should NOT be returned by the CONTAINS clause just as the LIKE operator below doesn't return it. 
    SQL> select full_name from test_user where full_name like 'P%'; 
    
    FULL_NAME 
    ---------------------------------------------------------------- 
    PAUL HERNANDEZ 
    Please can anyone suggest what to do about it?

    Thank you
    OrauserN

    No, you can skip all those, if you use SUBSTRING_INDEX.

  • Find text in secure file gives bad result

    I'm usung Adobe Reader 10.1.4 with Windows 7 32 bit.  When I try to find the text, I get a wrong result if the PDF is secured.  I get the correct result in a file that is not guaranteed.  The same search for the secure file works on another PC also running Adobe Reader 10 and Windows 7.  I uninstalled Adobe Reader and re-installed.  Any ideas on what could cause this?

    After much research of all options of security in programs I thought likely to affect Adobe Reader, I reached nothing a lot of expletives later, I found the solution

    Open Adobe Reader > edit > Preferences > search, click on "empty Cache Contents.

    Everything works again!

Maybe you are looking for

  • How to export Contact using the vCard and SMS to the non-iPhone user

    Hello so I just tried to share a contact, using Messages, from another phone (non-iPhone) and I expect Messages to send a vCard using SMS to other mobile phone, but instead the iPhone said: "failed to send Message."  Text messages normal sending very

  • COMPUTERS CONFIGURED WITH FIREWIRE?

    What current Apple computers i.e. pro, mini or iMac, are always sold or can be equipped with Firewire ports?

  • I try to install WLan on Satellite A65-S126

    I'm trying to set up wireless on my Toshiba A65-S126. I have the button positioned sideways on 'on', but Toshiba Wireless Projector (b) is not displayed. Somewhere I found the text that says I need to install the projector of the utility but I do not

  • HP Photosmart C5300: HP Photosmart C5300

    Hello Is - this all-in-one HP Photosmart C5300 works with WIN 10 / 64-bit?

  • Why can I not use a DVR, dynamically called VI

    Hi all I created the two screws. Next place in the same folder and open testDVR.vi. Run it with bCallMode = false once and once = true and see what happens... Why can I access and use the DVR when using the call by reference node and not when you use