ORA-13226 executing spatial query to the poster

Hello
in my database, I have a vision with spatial column. The view is based on the UNION ALL select. When I try to run the spatial query on the view, the database returns error ora-13226. When I recreate the view consist an only select (without UNION ALL) the spatial query returns correct result. You might help me pls how a spatial query view space whose definition contains UNION ALL select?

Thank you
Andrew

I don't know when this will be fixed by the Group of the optimizer, but there is a bug open about it: 8617254

Siva

Tags: Database

Similar Questions

  • ORA-29975: cannot save a query in the middle of a transaction active Castle ADF

    Hello

    I use JDeveloper 12.1.3. 64 bit.

    I have a unique feature on FirstEO EO object validator is based:

    public boolean validateSomeThingCheckRule() {}

    Boolean flag = false;

    Set of rows from the rowset = this.getMyVO1 (); / * an accessor to ViewObject MyVO * /.

    rowSet.setRangeSize(-1);

    rowSet.executeQuery (); /

    Line myRow = rowSet.first ();

    If (myRow! = null) {}

    .. .do something

    if(Something>0) {}

    flag = true;

    }

    else {}

    flag = false;

    }

    }

    return of flag;

    }

    The validator works well.

    I also Module of Application with java AMImpl class, where I replace before the commit operation:

    @Override

    {} public void beforeCommit (TransactionEvent transactionEvent)

    MyViewObjectImpl firstViewObjectImpl = getFirstVO1 (); / * Raturns FirstVO based on FirstEO * /.

    MyViewRowImpl firstViewRowImpl = (MyViewRowImpl) firstViewObjectImpl.getCurrentRow ();

    Set of rows myRowSet = (all lines) firstViewRowImpl.getAttribute ("MyVO1"); / * an accessor to ViewObject MyVO, as in the EO validator, they have both access same view MyVO object * /.

    MyRow = myRowSet.getRowSet () such () line; / * Here I have: ORA-29975: cannot save a query in the middle of an active transaction Castle * /.

    / * do something...*/

    super.beforeCommit (transactionEvent);

    }

    Can someone explain to me why and help me with the solution. Thx a lot.

    This is probably related to database change notifications.

    Maybe you have enabled auto-refresh on this VO?

    In addition, postings in beforeCommit() method of coding is not very good practice: this is the 'overall' method so it is called for each commit on each page, and in some cases, this method can be called by framework: http://andrejusb.blogspot.ba/2013/03/coding-validation-in-adf-bc-view-object.html

    Dario

  • "ORA-12154: TNS: could not resolve the connect identifier specified" error executing the execution in CAD Plan.

    Hi friends,

    We do face-down question when executing the execution Plan in DAC for full charge. We are working on the project of modernization of the OBI Applications and my client has worked on this environment is a few days. Before this, they load to the source 'EBSTST' instance and now changed data for instance 'EBSWKLY '. We have changed the details of connection under the tab 'Physical Data Sources' DAC. Test the connection Source and target are good. We have added input TNS of EBSWKLY in the path: u01/app/oracle/oracle11g/product/11.2.0/client_1/network/admin.

    ORA-12154: TNS: could not resolve the connect identifier specified

    Database driver error...

    Function name: connect

    [The database error: could not connect to the database using the [apps] user and the connection string [EBSWKLY].].

    Please suggest me if I m done mistake anywhere...

    Thanks in advance.

    Raghu Jen7782

    I was saying about the environment variables defined by you on the server of informatica/dac under the .profile or .bash_profile as below:

    TNS_ADMIN = $ORACLE_HOME/network/admin; Export TNS_ADMIN

    ORACLE_BASE = / home/oracle/app/oracle; export ORACLE_BASE

    ORACLE_HOME=$ORACLE_BASE/product/11.2.0/; Export ORACLE_HOME

    ORACLE_SID = InstanceName; export ORACLE_SID

    Path = $PATH: / usr/sbin: $ORACLE_HOME/bin. export PATH

    LD_LIBRARY_PATH=.:$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

    CLASSPATH = $ORACLE_HOME/jlib: $ORACLE_HOME/rdbms/jlib. Export CLASSPATH

    Here are some examples I mentioned everything. You can set them in the user profile from which you installed the server informatica/dac.

    If it is a CAR Forum, try to set the value of the instance-specific SID for example: orcl11 or orcl12 or orcl13... try to connect to each instance. Sometimes the general SID does not recognize configuration

  • ORA-04089: cannot create triggers on the objects belonged to SYS

    I did a google on this error and it say that I should never get to anything to do with the system and also to make another account when executing my script, I did this, but I still get the error code and the error is less than

    REM **********************************************************************

    CREATE TABLE gam_attribute_bin (/ * gam_ab * /)

    attribute_owner_type char (1) NOT NULL, / * player Att, Att User Instance Att Att class.

    Class criteria, client static/Gulp * /.

    ATTRIBUTE_NAME VARCHAR2 (20) NOT NULL,

    owner_id NUMBER (10) NOT NULL, / * specific check-in attribute_owner * /.

    LONG RAW NULL binary_value

    ) TABLESPACE gam_lgtab STORAGE (INITIAL 256 K NEXT 256 K MAXEXTENTS PCTINCREASE 0 unlimited)

    /

    ALTER TABLE gam_attribute_bin ADD)

    CONSTRAINT gam_attribute_bin_pk

    UNIQUE (attribute_owner_type, owner_id, attribute_name)

    USING INDEX

    TABLESPACE gam_ind

    STORAGE (INITIAL 256 K NEXT 256 K MAXEXTENTS PCTINCREASE 0 unlimited)

    )

    /

    Suppression of REM binary attribute when necessary

    CREATE TRIGGER gam_att_delete

    AFTER YOU REMOVE gam_attribute

    FOR EACH LINE

    BEGIN

    IF (: old.attribute_data_type = 'B')

    THEN

    DELETE FROM gam_attribute_bin

    WHERE attribute_owner_type =: old.attribute_owner_type

    AND attribute_name =: old.attribute_name

    AND owner_id =: old.owner_id;

    END IF;

    END;

    /

    ERROR on line 1:

    ORA-04089: cannot create triggers on the objects belonged to SYS

    hope someone can help me clear this up thanks

    Hello

    You code works very well for me.  I had to change to run on my system tablespaces, but otherwise, what you posted worked for me when I tried (in a different schema than SYS, of course).

  • "search query: = services the remote procedure call failed and did not run".

    My computer crashed two days ago and I'm finally home, but whenever I try to open a window of any folder I keep refusing. In particular the main computer folder. One of the error messages I got is the following:

    search query: = services the remote procedure call failed and did not run

    Followed by this one:

    The remote procedure call failed and did not execute.

    I opened the Task Manager and tried to access the services from there, but whenever I do, the Task Manager window freezes.

    How can I fix it, my computer is so slow running and does hardly anything and guard with all freezing orders that I try.

    Hello

    This error generally, if the system is infected with Virus and malware or system files are corrupt.

    Please, try the methods below and check if the problem persists.

    SFC scanner.

    You can read the following Microsoft article to repair corrupted using SFC tool files. Use the System File Checker tool to repair missing or corrupted system files

    Reference: http://support.Microsoft.com/kb/929833/en-us

    If the problem persists, try a run Microsoft Safety Scanner.

    http://definitionupdates.Microsoft.com/download/definitionupdates/safetyscanner/amd64/msert.exe

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Important: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    Do try the suggestions above and let us know the results.

  • An error occurred when querying for the pending operations

    Original title: sysprep problem
    I have an acer aspire 5738Z, I use windows 7 (64 bit) I try to open sysprep.exe and it does not open, a text box appears saying "an error occurred when querying for the pending operations. What can I do to fix this?

    Hello

    Thanks for posting the request in the Microsoft community forums.
    I understand that you receive the error "an error has occurred when querying for outstanding operations" when trying to open sysprep.exe on the computer.

    You can try the solutions provide and check if it helps solve the issue.

    Method 1:
    You can scan System File Checker to fix corrupted files.
    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833

    Method 2:
    If the steps above fail then you can try the steps and check.

    a. run regedit by typing regedit in start search by pressing ENTER.
    b navigate to the following key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
    Key: RegistrySizeLimit
    Type: REG_DWORD
    Value: 0xffffff (4294967295)
    c. reset.

    If you need help with Windows, keep us informed. We will be happy to help you.

  • Send the POST request with BLOB content

    Hello

    I usually use the following structure to send the POST request with content of varchar2 and numbers

          content := '{"Original File Name":"'||V_HOMEBANNER_1_EN_NAME(indx)||'"}';
         url := 'https://api.appery.io/rest/1/db/Names'; 
          req     := utl_http.begin_request(url, 'POST',' HTTP/1.1');
          UTL_HTTP.set_header(req, 'X-Appery-Database-Id', '5f2dac54b02cc6402dbe');
          utl_http.set_header(req, 'content-type', 'application/json');
          UTL_HTTP.set_header(req, 'X-Appery-Session-Token', sessionToken);
          utl_http.set_header(req, 'Content-Length', LENGTH(content));
          utl_http.write_text(req, content);
          res := utl_http.get_response(req);
    
    
    BEGIN
      LOOP
        utl_http.read_line(res, buffer);
      END LOOP;
      utl_http.end_response(res);
    EXCEPTION
    WHEN utl_http.end_of_body THEN
      utl_http.end_response(res);
    END;
    

    And it works very well. However, now I want to send/download (jpg image) files a blob in a MongoDB collection called "Files" (so url: = ttps://api.appery.io/rest/1/db/files). The guide of the collection is the next loop as a general advice:

    curl -X POST \
      -H "X-Appery-Database-Id: 5f2dac54b02cc6402dbe" \
      -H "X-Appery-Session-Token: <session_token>" \
      -H "Content-Type: <content_type>" \
      --data-binary '<file_content>' \
      https://api.appery.io/rest/1/db/files/<file_name>
    

    But I couldn't translate this curvature in PL/SQL query. Specifically, the part (-given binary '< file_content >")

    I have these BLOB files in an Oracle table, and they are stored with their names as follows:

    File_name File_content
    PIC_1.jpgBLOB OBJECT
    PIC_2.jpgBLOB OBJECT
    PIC_3.jpgBLOB OBJECT

    My question, how to download these images in the target URL?

    After a few hours I spent on it, I got it working. My solutions is inspired by this http://blog.optiosys.com/?p=246

    Since you must send you no the (same) CLOB and BLOB files, you need just need to replace .write_text by .write_raw.

    Here is my part of work for your reference:

    content: = V_HOMEBANNER_1_EN (indx);    -blob

    file_name: = 'test.jpg ';

    URL: = "https://api.appery.io/rest/1/db/files/": file_name;

    Req: = utl_http.begin_request (url, 'POST', ' HTTP/1.1');

    Utl_http.set_header (req, 'X-Appery-database - Id', '53fae4b02cc4021dbe');

    Utl_http.set_header (req, 'X-Appery-Session-token', sessionToken);

    Utl_http.set_header (req, "content-type', ' image/jpeg");

    req_length: = DBMS_LOB.getlength (CONTENT);

    DBMS_OUTPUT. Put_line (req_length);

    -IF YOU LIMIT THE DATA UNDER 32KB MSG:

    IF req_length<=>

    THEN

    Start

    Utl_http.set_header (req, "Content-Length", req_length);

    Utl_http.write_raw (req, content);

    exception

    while others then

    DBMS_OUTPUT. Put_line (SQLERRM);

    end;

    -IF MSG DATA MORE THAN 32 KB

    ELSIF req_length > 32767

    THEN

    BEGIN

    DBMS_OUTPUT. Put_line (req_length);

    Utl_http.set_header (req, "Transfer-Encoding", "Chunked");

    While (offset<>

    LOOP

    DBMS_LOB. Read (content, amount, offset, buffer);

    Utl_http.write_raw (req, buffer);

    offset: = offset + amount;

    END LOOP;

    exception

    while others then

    DBMS_OUTPUT. Put_line (SQLERRM);

    end;

    END IF;

    l_http_response: = UTL_HTTP.get_response (req);

    Utl_http.READ_TEXT (l_http_response, response_body, 32767);

    Utl_http.end_response (l_http_response);

    I hope this helps. Good luck

  • [ADF, JDev 12.1.3] To run a query on the fly is always necessary to define a VO? How to get the Id of the last line inserted in a VO...

    Hallo,

    Sometimes, in the code for my application, I need to run smaller queries to retrieve data from the database.

    I wonder if for these queries, it is necessary to define a View object or if I can avoid this for example creation and execution of a VO on the fly.

    In this case I would not define a VO, given that queries will be never used to display data, but only for the internal logic.

    A use case, I want to solve it next.

    I would like to create a function to be used after validation for last inserted record by a user in a TableVO.

    For example

    Select the Id of the Table where UserId =? and Type =?

    The query should be run in a managed bean...

    public String okButton_action() {}

    OperationBinding operationBinding is BindingsUtils.getBindings () .getOperationBinding ("Commit");.

    Object result = operationBinding.execute ();

    If (! operationBinding.getErrors () .isEmpty ()) {}

    Error handling

    return;

    }

    Here, I need to:

    1. run the query to get the Id of the last inserted record

    2 call the setCurrentRowWithKey on the TableVO to update the display

    and get the Id (identity/auto-increment) than the database

    assigned to the field

    return "return";

    }

    If I can create a function that creates / runs the VO on the fly and return the value ID... It is best to create it in a class of public services or in the implementation class TableVO?

    I need to get the Id of the last line inserted since the ADF is not able to manage MS SQL Server identity fields (it seems that REFRESH AFTER INSERT cannot be used with non - Oracle DB).

    Any notice will be welocome.

    Thank you

    Federico

    The query should be run in a managed bean...

    Much better to execute the query in the template project.

    Example query: http://amit-adf-work.blogspot.com/2013/09/how-to-execute-sql-using-adf-application.html

    If I can create a function that creates / runs the VO on the fly and return the value ID... It is best to create it in a class of public services or in the implementation class TableVO?

    If you have the function that accepts the SQL as a parameter, then this should go to class util.

    Dario

  • Execution of the query against the service

    I wonder what's the difference between running a query on a region that partitioned for a set of objects cached vs using a function distributed to the combined results and return them to the node running?

    The problem, I'm trying make me get all objects from the cache in a region that partitioned a certain type and then perform a calculation on the subject after I he gains the cache to see if it should be added to all final results that I return to my request. I'm not aiming for a specific node for these objects; they can reside anywhere in the partitioned area. Is this the same difference using a query and running the calculation on each object in the result of the query defined in terms of running a distributed function and perform the calculation in distributed mode before returning the results to the running node?

    I think I would use the API to query within the service (Query.execute (RegionFunctionContext)) to query local entries. Are you familiar with the API Query.execute (RegionFunctionContext)? Basically, who runs the query only on local data.

    Then filter these additional results in the function, and then finally to return results filtered out to the customer. Do the same filtering on each local server before returning anything to the client. According to the difference between the result set size and size final filtered results, you will gain a lot of IO, not to mention the serialization/deserialization. You may also be able to do the calculation in the query itself if you have a method for this in the object.

    Barry

  • DOUBLE DB: ORA-17629: unable to connect to the remote database server

    [oracle@ora11g1 ~] $ export ORACLE_SID = sales
    [oracle@ora11g1 ~] $ rman target sys/sales@sales

    Recovery Manager: release 11.2.0.1.0 - Production Wed Jun 5 13:00:15 2013

    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

    connected to target database: SALES (DBID = 690066655)

    RMAN > Connect auxiliary sys/salestby2@salestby2

    connected to the auxiliary database: SALES (not mounted)

    RMAN > CURRENT SPFILE DATABASE of TARGET duplicate FOR THE EVE OF the DATABASE
    2 > DB_NAME SET = 'sales '.
    3 > SET DB_UNIQUE_NAME = "salestby2".
    4 > control_files='/u02/oradata/salestby2/control01.ctl','/u02/oradata/salestby2/control02.ctl SET'
    5 > SET DB_FILE_NAME_CONVERT = "/ u02/oradata/sales /", "/ u02/oradata/salestby2 / '.
    6 > SET LOG_FILE_NAME_CONVERT = "/ u02/oradata/sales /", "/ u02/oradata/salestby2 / ';

    From duplicate Db 5 June 13
    using the control file of the target instead of recovery catalog database
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID = 20 type of device = DISK

    content of Script memory:
    {
    backup that copy reuse
    TargetFile ' / auxiliary format of the u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwsales
    ' / u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwsalestby2' targetfile
    ' / u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilesales.ora' auxiliary format
    ' / u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilesalestby2.ora';
    clone of SQL 'alter system set spfile = "/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilesalestby2.ora";
    }
    execution of Script memory

    From backup 5 June 13
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID = 58 type of device = DISK
    RMAN-03009: failure of the backup command on the channel ORA_DISK_1 at 05/06/2013 13:05:26
    ORA-17629: unable to connect to the remote database server
    ORA-17627: ORA-01017: name of user and password invalid. connection refused
    ORA-17629: unable to connect to the remote database server
    continue other job steps, not a not working will not re-run
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Db in dual at 05/06/2013 13:05:27
    RMAN-03015: an error has occurred in the script stored memory Script
    RMAN-03009: failure of the backup command on the channel ORA_DISK_1 at 05/06/2013 13:05:27
    ORA-17629: unable to connect to the remote database server
    ORA-17627: ORA-01017: name of user and password invalid. connection refused
    ORA-17629: unable to connect to the remote database server

    Welcome to the oracle forums!

    Please take the time to go through [url https://forums.oracle.com/forums/ann.jspa?annID=1535] FAQ PAGE

    Always after 4 version oracle numbers and details of the OS.

    Post any request outside has put between.

      \
    

    Tags

    Mark your questions answers if you give the answer

    Password for the SYS user on primary and standby must be the same. Copy the master password for the backup server

    SCP $ORACLE_HOME/dbs/orapwv112 : /u01/app/oracle/product/11.2/dbs/orapwdupv112

  • Error in query of the ordered result query contained CFSCRIPT in CF10

    I came across a very interesting error when you perform a query of a query within a CFSCRIPT tag...

    I get a result in withdrawal of a SQL Server stored procedure.  This is a list of metric names (METRIC_ID) and the metric measures themselves.

    I need to pull the METRIC_ID for this outcome, plans to make a JOIN on another query having display and other attributes of formatting for display in a web page.

    The following code runs without error when the query is not ordered:

    var displayDataQuery = new Query();

    displayDataQuery.setName ("joinedQuery");

    displayDataQuery.setDBType ("query");

    displayDataQuery.setAttributes (qry1 = fullMetricsListQuery);

    displayDataQuery.setAttributes (qry2 = arguments.cubeData);

    displayDataQuery.setSQL ("SELECT METRIC_ID FROM qry2");

    var tempResultSet = displayDataQuery.execute ();

    var cubeMetricIDList = tempResultSet.getResult ();

    When I take the same results of exact query of the same stored procedure, but it is controlled by an ORDER BY clause, this statement;

    var tempResultSet = displayDataQuery.execute ();

    get the following error: "value" cannot be converted to a number.»   It is 2 apostrophes, meaning an empty string between 'value' and 'impossible.'


    Wait, what?  I want to just a list of names metrics, varchars.  Why is there a conversion error...?


    The error in the end pprovided back to ColdFusion10\cfusion\CustomTags\com\adobe\coldfusion\base.cfc, line 445

    OK, this is where it takes an interesting twist...

    Starting at line 444, in base.cfc, line 445 bolded in red:

    "< cfif sqlType NEQ" "and arraylen (sqlParams) gt 0 >."

    < cfloop index = "i" = "2" to = "#ArrayLen (sqlArray) #" >

    < arraylen (sqlParams) of lte cfif (i-1) >

    < cfqueryparam attributeCollection = "#sqlParams [i-1] #" / >

    < / cfif >

    #getPreserveSingleQuotes (sqlArray [i]) #.

    < / cfloop >

    < / cfif >

    So if I understand correctly, when I have a query, unordered, copy the following code in base.cfc bed the SQL code in displayDataQuery.setSQL ("SELECT METRIC_ID FROM qry2"), but is not when the query is controlled by METRIC_ID... ?

    Oh, wait... the CFDUMP when using an ordered set of data says something else...

    query
    RESULTSET
    CACHINGfake
    EXECUTIONTIME4
    SQLSELECT * FROM qry1 ORDER OF METRIC_ID, LOCATION

    I'm a bit confused why the same data in works set ordered, while an ordered set causes this error.

    All useful suggestions or clues would be greatly appreciated!

    Do you mean that the error has occurred without the order by clause?

    Given that the error only occurs with one unsorted data set, I'm a bit confused why you ask this...?

    I've followed your suggestion:

    Run the same code, but use the cfquery instead of cfscript tag. The error persists there?

    My assumption was that your suggestion is to test it against a set of ordered data because that is what caused the original error.

    Unfortunately, the error occurs in the scenarios the tag and script-based.

    There is absolutely no sense why this happens.  The order of a set of data should have no impact on a query of a query on a column defined as varchar.

    If there are null values in the other columns defined as a type of digital, big deal, the code in question does not seek to assess these columns.  Still more interesting thing is why disorderly orderly vs makes a difference.

  • ORA-20001: unauthorized access (package for the undefined security group variable).

    I'm creating an application that uses the authentication of the APEX and characteristics (work) registration and forgot password forms (does not work).

    My I forgot the password is public (requires authentication). The user provides the user name and a secret answer, which are validated and then provides the new password. I try to use htmldb_util.reset_pw to reset the password of the user, but it does not work.

    I have a process on the new password page call a PL/SQL anonymous block that looks like this (see below), where username = P16_ITEM1 and P18_ITEM1 = new password.

    BEGIN
    apex_040000.htmldb_util.reset_pw (V ('P16_ITEM1'), V ('P18_ITEM1'));
    END;

    I don't know how to send a message of success/failure of such PL/SQL block to the APEX, but that's a separate issue, I guess.

    In any case, during the trial through SQL Developer as the user with APEX_ADMINISTRATOR_ROLE, I get the following error:

    ORA-20001: unauthorized access (package for the undefined security group variable).
    ORA-06512: at "APEX_040000.WWV_FLOW_FND_USER_API", line 22
    ORA-06512: at "APEX_040000.WWV_FLOW_FND_USER_API", line 1220
    ORA-06512: at "APEX_040000.HTMLDB_UTIL", line 1253
    ORA-06512: at line 8 level

    I've searched previous discussions and tried different suggestions with no luck.

    I'm on Oracle DB 11g XE and APEX 4.x.

    Any help will be appreciated. Thank you

    Alex.

    In any case, during the trial through SQL Developer as the user with APEX_ADMINISTRATOR_ROLE, I get the following error:

    ORA-20001: unauthorized access (package for the undefined security group variable).

    When executing code outside the Apex which depends on the security defined Apex group, perform the following steps before your own code:

    wwv_flow_api.set_security_group_id(apex_util.find_security_group_id('YOUR_SCHEMA_NAME'));
    

    Google "wwv_flow_api.set_security_group_id" for more details, like this blog:

    http://www.easyapex.com/index.php?p=502

    -Morten

    http://ORA-00001.blogspot.com

  • ORA-00979 in one but not the other. Why?

    Oracle Database 11 g Enterprise Edition Release 11.1.0.6.0 - 64 bit Production

    SELECT the 'X' WHEN A.Dummy 42 THEN END OF double, (SELECT Dummy FROM Dual) a GROUP OF Dual.Dummy;
    SELECT the 'X' WHEN A.Dummy 42 THEN END OF double, (SELECT ' X' FROM Dual Dummy) a GROUP OF Dual.Dummy;

    First an error: ORA-00979: not a GROUP BY expression
    Other works.

    Why?

    Hello

    This seems to be a transformation/display fusion issue queries. You can replicate the behavior in the second query using the no_merge hint...

    SELECT
        CASE 'X' WHEN A.Dummy THEN 42
        END
    FROM
        Dual,
        (SELECT /*+ no_merge */ 'X' Dummy FROM Dual) A
    GROUP BY
        Dual.Dummy;
    
    SELECT
        CASE 'X' WHEN A.Dummy THEN 42
        END
    FROM
        Dual,
        (SELECT 'X' Dummy FROM Dual) A
    GROUP BY
        Dual.Dummy;
    
    XXXX> SELECT
      2      CASE 'X' WHEN A.Dummy THEN 42
      3      END
      4  FROM
      5      Dual,
      6      (SELECT /*+ no_merge */ 'X' Dummy FROM Dual) A
      7  GROUP BY
      8      Dual.Dummy;
        CASE 'X' WHEN A.Dummy THEN 42
                      *
    ERROR at line 2:
    ORA-00979: not a GROUP BY expression
    
    Elapsed: 00:00:00.03
    XXXX>
    XXXX> SELECT
      2      CASE 'X' WHEN A.Dummy THEN 42
      3      END
      4  FROM
      5      Dual,
      6      (SELECT 'X' Dummy FROM Dual) A
      7  GROUP BY
      8      Dual.Dummy;
    
    CASE'X'WHENA.DUMMYTHEN42END
    ---------------------------
                             42
    
    1 row selected.
    

    If you run a trace 10053, you should be able to see the specific cause

    HTH

    David

    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    
    5 rows selected.
    

    Published by: Bravid on February 28, 2012 17:21

  • ORA-12154: TNS: could not resolve the connect identifier specified in 11g R2

    Hello

    Recently we changed the name of our Linux server, after chanding hostname, I made changes in tnsnames.ora and listener.ora and also local_listener at the database level.

    When I am trying to connect database of his failure with the error.

    [orawiz@wizapp admin] $ sqlplus system/oracle@WIZ

    SQL * more: Production of release 11.2.0.1.0 LUN 20 16:57:58 Feb 2012

    Copyright (c) 1982, 2009, Oracle. All rights reserved.

    ERROR:
    ORA-12154: TNS: could not resolve the connect identifier specified


    Here's my entires of tns.

    [orawiz@wizapp admin] $ cat tnsnames.ora
    tnsnames.ora # Network Configuration file: /wiz_app/wiz/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.

    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = 10.172.20.236)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = wiz)
    )
    )

    #wiz = (DESCRIPTION =
    # (ADDRESS_LIST =
    # (ADDRESS = (PROTOCOL = TCP) (HOST = 10.172.20.236)(PORT = 1521))
    # (CONNECT_DATA =
    # (SERVER = DEDICATED)
    # (SERVICE_NAME = wiz)
    # )
    # )

    [orawiz@wizapp admin] $ cat listener.ora
    listener.ora # Network Configuration file: /wiz_app/wiz/oracle/product/11.2.0/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.

    WIZ =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP) (HOST = 10.172.20.236)(PORT = 1521))
    )
    )

    #SID_LIST_LISTENER =
    # (SID_LIST =
    # (SID_DESC =
    # (SID_NAME = wiz)
    # (GLOBAL_DBNAME = wiz)
    # (ORACLE_HOME = wiz_app/wiz/oracle/product/11.2.0/db_1)
    # )
    # )


    ADR_BASE_LISTENER = / wiz_app/wiz/oracle

    [orawiz@wizapp admin] $ cat sqlnet.ora
    sqlnet.ora # Network Configuration file: /wiz_app/wiz/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora
    # Generated by Oracle configuration tools.

    NAMES. DIRECTORY_PATH = (TNSNAMES, EZCONNECT)

    ADR_BASE = / wiz_app/wiz/oracle


    tnsping also default.

    [orawiz@wizapp admin] tnsping wiz $

    AMT Ping utility for Linux: Version 11.2.0.1.0 - Production on 20 February 2012 17:03:16

    Copyright (c) 1997, 2009, Oracle. All rights reserved.

    Use settings files:
    /wiz_app/Wiz/Oracle/product/11.2.0/Db_1/network/admin/SQLNET.ora

    AMT-03505: failed to resolve the name
    [orawiz@wizapp admin] $

    Nothing to with listener.ora file with ORA-12154.
    If the listener does not not or the status is not ready then it's listener.ora.

    Below add entries in your file tnsnames.ora and post $tnsping wiz

    WIZ =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 10.172.20.236)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = wiz.)
        )
      )
    

    Publish your file sqlnet.ora

    Published by: CKPT on 20 February 2012 17:28

  • SQL query with the troubleshooting Subselects

    I have a query with the 3 Subselects. Each of the Subselects works very well on its own. I run the query in Oracle SQL Developer and get ORA 933 "sql command not completed successfully" at 47 48 line pass. I am unable to say what is causing the error. The pointers you know sincerely!

    Here is the code:
    SELECT 
      adjud.country,
      adjud.site,
      adjud.prodtype,
      sum(adjud.acount) + sum(denied.dcount) as TotalClosed,
      case when adjud.adtype = 'Paid' then adjud.acount End as NumPaid,
      case when adjud.adtype = 'Paid' then adjud.totalpaid End as AmtPaid,
      count(adjud.contest) + count(denied.contest) + count(pend.contest) as CntContestable,
      sum(pend.pcount) as PendingCount,
      Case when pend.overunder = 'Over' Then count(pend.pcount) End as Over90Count,
      sum(pend.facevalue) as PendingAmount
    From 
    ( select 
        count(clm.clm_nbr) as acount, 
        sum(clm.rsrv_amt) as facevalue,
        sum(clm.tot_pd_amt) as totalpaid,
        clm.prdt_type_nm as prodtype,
        clm.cntsbl_indc as contest,
        case when clm.exam_co_cd in ('107','134')
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End as country,
        clm.exam_admin_site_cd as site,
        Case when clm.rmk_cd in ('R00', 'R01', 'R02') then 'Denied' Else 'Paid' End as adtype
      from afp_cds.claim_vw clm
      where 
        clm.adjud_dt is not null and 
        clm.adjud_dt > :startDate and
        clm.adjud_dt < :EndDate
      group by 
        clm.prdt_type_nm,
        clm.cntsbl_indc,
        case when clm.exam_co_cd in ('107','134') 
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End,
        clm.exam_admin_site_cd,
        Case when clm.rmk_cd in ('R00', 'R01', 'R02') then 'Denied' Else 'Paid' End
    ) as adjud, 
    ( select 
        count(clm.clm_nbr) as dcount,
        sum(clm.rsrv_amt) as facevalue,
        clm.prdt_type_nm as prodtype,
        case when clm.exam_co_cd in ('107','134') 
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End as country,
        clm.exam_admin_site_cd as site,
        clm.cntsbl_indc as contest
      from afp_cds.claim_vw clm
      where 
        clm.deny_dt is not null and
        clm.deny_dt > :startDate and
        clm.deny_dt < :EndDate
      group by
        clm.prdt_type_nm,
        case when clm.exam_co_cd in ('107','134') 
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End,
        clm.exam_admin_site_cd,
        clm.cntsbl_indc
    ) as denied,
    ( select 
        count(clm.clm_nbr) as pcount, 
        sum(clm.rsrv_amt) as facevalue,
        clm.prdt_type_nm as prodtype,
        case when clm.exam_co_cd in ('107','134') 
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End as country,
        clm.exam_admin_site_cd as site,
        clm.cntsbl_indc as contest,  
        case when sysdate - clm.regtrtn_dt > 90 then 'Over' else 'Under' End as overunder
      from afp_cds.claim_vw clm
      where
        clm.adjud_dt is null and
        clm.deny_dt is null
      group by
        clm.prdt_type_nm,
        case when clm.exam_co_cd in ('107','134') 
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End,
        clm.exam_admin_site_cd,
        clm.cntsbl_indc,  
        case when sysdate - regtrtn_dt > 90 then 'Over' else 'Under' End
    ) as pend
    
    where
      adjud.prodtype = denied.prodtype and
      adjud.country = denied.country and
      adjud.site = denied.site and
      adjud.contest = denied.contest and
      adjud.prodtype = pend.prodtype and
      adjud.country = pend.country and
      adjud.site = pend.site and
      adjud.contest = pend.contest 
    group by
      adjud.country,
      adjud.site,
      adjud.prodtype,
      case when adjud.adtype = 'Paid' then adjud.acount End,
      case when adjud.adtype = 'Paid' then adjud.totalpaid End,
      Case when pend.overunder = 'Over' Then count(pend.pcount) End

    Do not use "Sub" with the table alias.

    Change this stmt type:

    ) as adjud,
    

    TO

    ) adjud,
    

Maybe you are looking for

  • Question of Newby on Skype

    I can sign, but directly afterwards, I go to 'MY ACCOUNT' I don't see the home button, and the home page doesn't seem to be accessible from "MY ACCOUNT..." FAQ doesn't have the answer after almost 30 minutes to search and play... HHHHEEELLLPPP

  • HP Photosmart 5520: Duplex HP5520

    Please can someone advise on Duplex (duplex) printing a PDF file by doing a HP5520 connected to an iMAC computer.   I don't see any option for it in the settings. Thank you

  • several sources triggers digital i/o card

    I use the NOR-HSDIO Express (Acquisition) with map of the e/s high-speed digital (pxi-6542), to a Logic Analyzer.  It works fine but I need to use more than 1 source of relaxation, for example when 3 signals go data capture high (rising edge).  I don

  • Excel and Adobe Acrobat say "no printer is installed.

    Running Vista on a desktop computer.  Just installed SP2 and since that time cannot print from excel or adobe acrobat.  Both of them give the error message that no printer is installed.  Tried to remove all printers and reinstall the drivers directly

  • After downloading Vista updates

    After downloading Vista updates and install them, I get the new updates icon in the taskbar. While they inspected the history update, I see where the update was installed. What should I do to get rid of him. It comes even when I restart my computer.