Oracle 10g Clause WHERE properly executed.

Enterprise Edition Release 10.2.0.4.0 - 64 bit seems to be a bug.

If SQL "first_insert_date = to_date ('2010-09-07', 'YYYY-MM-DD')" paragraph, he must show 7 tuples. "." but it shows me tuples 0 sometimes.
Please find below the log.
Where is the site of Oracle bug report?


SQL * more: Release 10.2.0.1.0 - Production Wed Sep 8 07:18:48 2010

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production 64-bit
With partitioning, OLAP, Data Mining and Real Application Testing options

SQL > delete from SCENARIO_SUSPICION_AUDIT_MGT where first_insert_date = to_date (' 2010-09-07', ' YYYY-")
MM - DD') and scenario_seq in (select scenario_seq from the scenario_transaction where scenario_cd = ' MA00)
011' and not scenario_ins_id1 (select max (scenario_ins_id1) in the scenario_transaction where scena)
rio_cd = "MA00011" group of ss1));

0 rows deleted.

SQL > select count (*) in the SCENARIO_SUSPICION_AUDIT_MGT where scenario_seq in (select scenario_seq en
OM scenario_transaction where scenario_cd = 'MA00011' and scenario_ins_id1 not in (select max (scenar
io_ins_id1) from scenario_transaction where scenario_cd = "MA00011" group of ss1));

COUNT (*)
----------
20

SQL > select first_insert_date, count (first_insert_date) in the SCENARIO_SUSPICION_AUDIT_MGT where scena
rio_seq in (select scenario_seq from the scenario_transaction where scenario_cd = 'MA00011' and scenario
insid1 not in (select max (scenario_ins_id1) in the scenario_transaction where scenario_cd = ' MA00011)
"Group of ss1)) first_insert_date group;

FIRST_INSERT COUNT (FIRST_INSERT_DATE)
------------ ------------------------
AUG 30, 10 1
JULY 12, 10 1
JULY 5, 10 1
AUG 2, 10 1
MAY 31, 10 1
AUGUST 16, 10 2
AUGUST 16, 10 2
05-SEPT 3.-10
7-07.-10
06-SEPT 1.-10

10 selected lines.

SQL > delete from SCENARIO_SUSPICION_AUDIT_MGT where first_insert_date = ' 07 - SEVEN.-10' and scenario_seq
in (select scenario_seq from the scenario_transaction where scenario_cd = 'MA00011' and scenario_ins_id
1 not in (select max (scenario_ins_id1) in the scenario_transaction where scenario_cd = "MA00011" group
by ss1));

0 rows deleted.

SQL > select count (*) in the SCENARIO_SUSPICION_AUDIT_MGT where first_insert_date = to_date ('07-09-2010
'yyyy-mm-dd') and scenario_seq in (select scenario_seq from the scenario_transaction where scenario_c)
d = "MA00011" and not in scenario_ins_id1 (select max (scenario_ins_id1) in the wh scenario_transaction
Scenario_cd = "MA00011" AGE group of ss1));

COUNT (*)
----------
0

SQL > select count (*) in the SCENARIO_SUSPICION_AUDIT_MGT where first_insert_date > to_date ('2010-09-06
'yyyy-mm-dd') and scenario_seq in (select scenario_seq from the scenario_transaction where scenario_c)
d = "MA00011" and not in scenario_ins_id1 (select max (scenario_ins_id1) in the wh scenario_transaction
Scenario_cd = "MA00011" AGE group of ss1));

COUNT (*)
----------
7

SQL > delete from SCENARIO_SUSPICION_AUDIT_MGT where first_insert_date > to_date (' 2010-09-06', ' yyyy-")
mm - dd') and scenario_seq in (select scenario_seq from the scenario_transaction where scenario_cd = ' MA00)
011' and not scenario_ins_id1 (select max (scenario_ins_id1) in the scenario_transaction where scena)
rio_cd = "MA00011" group of ss1));

7 deleted rows.

SQL > commit;

Validation complete.

SQL >

As first_insert_date is a DATE data type, its data probably contains also the hours, minutes, and seconds.

Therfore your WHERE clause... .or first_insert_date = to_date ('2010-09-07', 'YYYY-MM-DD') will always return 0 rows.

It returns the correct number of lines, your WHERE clause must be... where trunc (first_insert_date) = to_date ('2010-09-07', 'YYYY-MM-DD')

Tags: Database

Similar Questions

  • Where to place the folder forms and reports for oracle 10g on Linux server

    Hello...

    Currently, iam has a migration to oracle 10g module.
    All my modules which consists of form and report files are inside a
    folder named PROJECT and placed in C:\ in windows server.
    So when I want to call a form or a report I used the path as "C:\PROJECT\module_name\form_name.fmx."
    My client now wants her project to be used in the LINUX-based server.

    Now, I want to know where I should put my form project file and file reports
    and how I should call them...

    Thanks in advance

    Can you say how can I call reports as u said hardcode the path when the report is not a good practice.

    I agree with Dhiraj Madan, paths of coding is a very bad idea, your application has become non-portable.

    For FORMS_PATH, you can use default.env, as already said (or .env, if applicable).

    The same can be done for REPORTS_PATH, using the reports.sh script, in $ORACLE_HOME/bin.

  • Is there a way to fill the boss way recursive/dynamically in oracle 10g

    Hello

    I want to complete the following template and then use the result as a virtual table in oracle 10g.

    SELECT 2 FROM DUAL;

    UNION ALL

    4. SELECT FROM DUAL;

    ALL UNIONL

    8. SELECT FROM DUAL;

    .

    .

    .

    .

    UNION ALL

    . SELECT POWER (2.61) FROM DUAL;

    Is it possible that I can use the recursion or dynamic query with "with clause" and avoid writing all these statements.

    Thank you

    YG

    Hi GY,.

    In 10g, you can use a clause of the TYPE:

    SELECT nbr

    OF THE DOUBLE

    MODEL

    DIMENSION (2 d)

    MEASURES (number 0)

    RULES ITERATE (61)

    (nbr [ITERATION_NUMBER] = power (2, ITERATION_NUMBER + 1))

    ORDER BY nbr;

    From 11 g 2, you can use a WITH recursive clause:

    WITH v (n, lvl) AS (SELECT 2 n, 1 lvl FROM DUAL

    UNION ALL

    SELECT 2 * n, 1 + lvl

    V

    WHERE the lvl<=>

    )

    Select n v

  • IN construction in the clause WHERE of VO with bind variable

    Hello
    With the help of JDev 11.1.1.3.0.
    I have a SQL according to VO following where clause ' WHERE some_nbr IN: inSomeNbrStr'
    -l' some_nbr attribute is of type oracle.jbo.domain.Number.
    -variable binding inSomeNbrStr is of type String.
    I'm assuming that this variable linking parameter to for example. "101, 102' or '(101, 102) ' before the execution of the query might work.
    "However, I get ' ORA-01722: invalid number." Other than the substitution of executeQueryForCollection() and manipulate by program the
    query is - anyone know a more declarative way to achieve this?
    Thank you
    Kenneth

    Hello

    You "MOUNT" the binding variable to get the values separated by commas.

    See this article (Search Using Comma-Separated bind string for the Variable in the list) on how to achieve this.

    It has been developed over 10g. But I think it will hold good for 11g as well.

    Arun-

  • Oracle 10g Rac (TAF)

    Hello
    I'm known for RAC env.
    How to implement TAF in oracle 10g RAC approx.
    and how do you know... and how conf (base & preconnect) services for which use them.
    Thank you
    KK

    Published by: user603328 on June 20, 2010 12:02

    Before you configure TAF, you should know about TAF

    If the instance fails, TAF allows applications to automatically reconnect to a different instance. The new connection will be identical to the original, but uncommitted, existing at the time of breaking transactions will be cancelled.

    TAF can be configured to perform two types of failover: session and selectwith the resumption of the session, any uncommitted transaction will be cancelled, and the session will be linked to another instance, with the resumption of the selection, uncommitted transactions will be cancelled, the second will be connected to another instance and any select statement that was running at the time of the breakup will be rerun by the sesion again using the same RCS and recoveries lines will be rejected upward until the original request has failed. The Select statement will continue return the remaining rows to the client.

    a TAF connection must be configured in the configuration file net tnsnames.oraOracle. In oracle 10.1 and higher, the DBCA services management page can generate appropriate TNS for the TAF entries.

    To configure the TAF, the TNS entry should include a FAILOVER mode clause that defines the properties of the recovery as follows,

    TYPE attribute defines the behavior as a result of a failure. Value: Session, select or none

    Attributes of the METHOD--> when connections are made to the failover. Value: base or preconnect

    ATTEMPTS--> number of times where a connection should be attempted before displaying an error.

    DELAY--> the time in seconds between each connection attempt.

    Reading Document Oracle,

    http://www.Oracle.com/pls/db102/search?word=configure+TAF&PartNo=

  • ORA-01079: ORACLE database was not properly created, operation canceled

    Hi all
    On Oracle Database 10g Enterprise Edition Release 10.2.0.1.0

    My problem is that I have to delete the database as the same is not created correctly.
    To do this, I get the error when I try to mount the database below.

    ORA-01079: ORACLE database was not properly created, operation canceled

    Also, when I started the database by specifying the file pfile, he threw out saying error
    ORA-00202: control file: ' D:\ORACLE_10G\DATABASE\CTL1SAMPLEDB. ORA'

    When I specified control_files clause in init.ora, that I was getting above error, so I tried to remove the same but still facing the same error.

    Can someone help me solve the problem...?

    Thank you

    ROCs Rossy says:
    Hi all
    On Oracle Database 10g Enterprise Edition Release 10.2.0.1.0

    My problem is that I have to delete the database as the same is not created correctly.
    To do this, I get the error when I try to mount the database below.

    ORA-01079: ORACLE database was not properly created, operation canceled

    Also, when I started the database by specifying the file pfile, he threw out saying error
    ORA-00202: control file: ' D:\ORACLE_10G\DATABASE\CTL1SAMPLEDB. ORA'

    When I specified control_files clause in init.ora, that I was getting above error, so I tried to remove the same but still facing the same error.

    Can someone help me solve the problem...?

    Thank you

    You should be able to do the following on the command line windows

    oradim -delete -sid sampledb
    

    then remove the D:\ORACLE_10G\DATABASE\ of the file system folder (assuming that there are only records your db in there.
    Finally, delete the D:\ORACLE_10G\ADMIN\SAMPLEDB folder structure assuming it exists.

    Niall Litchfield
    http://www.orawin.info

  • Oracle 10g with 10.2.0.5 patch app thin?

    Hello

    I'm working on creating a fine app for oracle 10g. I am able to create the thin application without patch and everything seems to work normally, but in our situation, we must apply the 10.2.0.5 patch. When I patch the program, everything still seems to work ok, so I'm going through with the postscan, which also seems to work fine until there finishes.

    I don't know if this is related, but I get the following warnings after the postscan:

    Could not copy the file--> C:\Program Files (x 86) C:\ProgramData\Microsoft\RAC\StateData\RacMetaData.dat \VMware\VMware ThinApp\Captures\Oracle 10 g + patch\%Common AppData%\Microsoft\RAC\StateData\RacMetaData.dat
    Could not copy the file--> C:\Program Files (x 86) C:\ProgramData\Microsoft\RAC\StateData\RacWmiEventData.dat \VMware\VMware ThinApp\Captures\Oracle 10 g + patch\%Common AppData%\Microsoft\RAC\StateData\RacWmiEventData.dat
    Could not copy the file--> C:\Program Files (x 86) C:\ProgramData\Microsoft\Search\Data\Applications\Windows\MSStmp.log \VMware\VMware ThinApp\Captures\Oracle 10 g + patch\%Common AppData%\Microsoft\Search\Data\Applications\Windows\MSStmp.log
    Could not copy the file C:\Users\All Users\Microsoft\RAC\StateData\RacMetaData.dat--> C:\Program Files (x 86) \VMware\VMware ThinApp\Captures\Oracle 10 g + patch\%drive_C%\Users\All Users\Microsoft\RAC\StateData\RacMetaData.dat
    Could not copy the file C:\Users\All Users\Microsoft\RAC\StateData\RacWmiEventData.dat--> C:\Program Files (x 86) \VMware\VMware ThinApp\Captures\Oracle 10 g + patch\%drive_C%\Users\All Users\Microsoft\RAC\StateData\RacWmiEventData.dat
    Could not copy the file C:\Users\All Users\Microsoft\Search\Data\Applications\Windows\MSStmp.log--> C:\Program Files (x 86) \VMware\VMware ThinApp\Captures\Oracle 10 g + patch\%drive_C%\Users\All Users\Microsoft\Search\Data\Applications\Windows\MSStmp.log
    Could not copy the file C:\Users\All Users\Microsoft\Windows Defender\IMpService925A3ACA-C353 - 458 A-AC8D - A7E5EB378092.lock--> C:\Program Files (x 86) \VMware\VMware ThinApp\Captures\Oracle 10 g + patch\%drive_C%\Users\All Users\Microsoft\Windows Defender\IMpService925A3ACA-C353 - 458 A-AC8D - A7E5EB378092.lock
    Could not copy the file C:\Users\All Defender\Scans\History\CacheManager\MpSfc.bin--> C:\Program Files (x 86) Users\Microsoft\Windows \VMware\VMware ThinApp\Captures\Oracle 10 g + patch\%drive_C%\Users\All Users\Microsoft\Windows Defender\Scans\History\CacheManager\MpSfc.bin

    And then finally I get this at the end of the 'Build Project' message:

    C:\Windows\hh.exe: an executable not valid
    Build failed *.

    I can't determine why the build fails.

    Any help would be appreciated.

    Hi Mark

    1. the warnings that you are seeing after Postscan aren't a problem, in my view, they are for most of the newspapers that were not copied to the ThinApp of your application project (probably because access is denied because some application process is running and use).

    2. the error you see regarding hh.exe during the generation probably occurs because it is a 64-bit binary (and ThinApp 4.7.3 can't stand not the 64-bit binaries), in all cases, please open the file package.ini in the project folder (the folder that contains the project ThinApp registered Oracle 10 g, generated by the capture process) and find the section [hh.exe] and add 'Disabled = 1' under it , and then try again to build again by running build.bat.

    Thank you.

  • customer of oracle 10g 64 bit to win7 64-bit

    where can I find it? I'm not even a link to the oracle 10g client download on otn.
    I have an oracle 10g 32-bit client that I currently use on win7 64 bit OS but I need 64-bit customer oracle 10g.

    10g downloads are deleted from the RTO. If you want, you must get in contact with the support.

    Aman...

  • Oracle 10g support for life

    Hi friends,

    Where can I find information on when the regular support for oracle 10g ends?
    Is there a summary matrix on oracle.com? I couldn't find that browsing the company Web site information.

    Thank you very much

    Hello

    Take a look at metalink Note 161818.1

    and...

    Total Questions:      62 (36 unresolved)
    

    ... Please mark questions answers and correct/good...

    HTH...

    -wiZ

  • Imported a few diagrams of Oracle database 11g oracle 10g

    Hello

    I have the task to import some schemas are basis of oracle 10g (10.2.0.4) in the database to oracle 11 GR 2 (11.2.0.2). Now I only oracle 10g export and import utility (the 11g server is not where I give myself the import duties).

    I can do the export of the g 10 patterns using the 10 g utility to export and then import into database 11 g using the 10 g import utility? I ran a test to do this and found it works but I would like also to have advice from experts on this subject.

    Also another question is: If the schema of the source is 11g - assume - can the utility of export/import of 10g still work in this case? I mean the scheme for the export of db1 say (which is 11 g) using 10 g utility to export and import them into 11 g db2 database (which is still 11 g) using 10 g import? I request because I don't have access to the 11g server and trying to find what I can do with the 10g utilities.

    Thank you

    set up a database connection to the database to version 10 gr 2 in 11 GR 2 database.
    Now using the client impdp GR 11, 2 utility use
    Impdp network_link =

    Fact.
    Your "objection" you have no access to GR 2 11 does not count that you can install a client of 11 GR 2.

    Also in general do not use a version more low imp to imp to a higher version database
    Exp and imp are also deprecated in 10g and more.

    -------------
    Sybrand Bakker
    Senior Oracle DBA

  • How to use Oracle 10g (LOGMINER) consistent with DBA privileges JKM

    Hi gurus,

    Transposition of the CDC, we are checking out JKM Oracle 10g coherent (LOGMINER).
    Only restriction is that we can have no privilege DBA granted to the user of the ODI.

    So far, I did the following

    JKM Oracle 10g compatible (LOGMINER) uesed with

    ASYNCHRONOUS_MODE = NO
    AUTO_CONFIG = NO
    JOURNAL_TABLE_OPTIONS: USERS


    1 source schema: test
    2. There are 2 tables (DEPT_CDC_SRC and EMP_CDC_SRC) in the schema of the TRIAL, the two were added to the process of the CDC
    3 schema work: cdc

    4. from SYS schema the following grants were given to ODI work shema user.

    Grant connect, the cdc resources
    GRANT SELECT ANY TABLE OF CDC
    Grant EXECUTE ON dbms_stats to cdc
    Grant execute on DBMS_CDC_PUBLISH at CDC
    Grant execute on DBMS_CDC_UTILITY to CDC
    Grant execute on DBMS_CDC_SUBSCRIBE at CDC
    Grant execute on DBMS_STREAMS_CDC_ADM to CDC
    Grant execute on DBMS_CDC_IPUBLISH to CDC
    Grant execute on DBMS_CDC_SYS_IPUBLISH to CDC
    Grant execute on DBMS_CDC_ISUBSCRIBE at CDC
    Grant execute on DBMS_CDC_DPUTIL to CDC
    Grant execute on DBMS_CDC_EXPDP to CDC
    Grant execute on DBMS_CDC_EXPVDP to CDC
    Grant execute on DBMS_CDC_IMPDP to CDC

    5. as a user SYSDBA has done the following:
    ====================================
    SHUTDOWN IMMEDIATE;
    BOOTABLE MEDIA;
    ALTER DATABASE ARCHIVELOG;
    ALTER DATABASE OPEN;
    ALTER SYSTEM ARCHIVE LOG START;
    ALTER SYSTEM SWITCH LOGFILE;
    ===================================

    6 start journal... it fails to create the stage newspaper.
    with the following error
    ORA-06512: at "SYS." DBMS_CDC_PUBLISH.

    7. for the goal conceded role DBA to CDC test and start the log it is successful

    8 revoked of CDC DBA and restart the log. It still fails to form newspaper market.
    with the same error i.e.
    ORA-06512: at "SYS." DBMS_CDC_PUBLISH.

    How to solve this problem without any DBA privilege to the scheme of ODI work?

    Kind regards
    Frédéric

    Published by: 804400 on November 24, 2010 02:39

    Hello

    http://www.DBA-Oracle.com/t_insifficient_privileges_create_view_grant.htm said

    You must have the privileges of the object that you made from tables

    Privileges required to create views

    To create a view, you must meet the following requirements:

    You must have been granted the CREATE VIEW (to create views in your schema) or CREATE ANY VIEW (to create a view of another user schema) system privilege, either explicitly, or by a role.

    You need to explicitly obtain the SELECT, INSERT, UPDATE, or DELETE privileges object on all underlying base objects in the view or system privileges SELECT ANY TABLE, INSERT a WHOLE TABLE, UPDATE ANY TABLE or DELETE ANY TABLE. You may not have gotten these privileges through roles.

    I hope this helps.

    Thank you
    Fati

  • Oracle 10G EXPRESS EDITION for windows7

    Hi all
    can you guys please give me the link to download oracle 10g express edition for windows7
    I had already downloaded one for windows7, but when I go to install, I can't able to execute it, and that the file downloaded, said the PUBLISHER OF THIS PROGRAM could not BE VERIFIED.

    SO CAN U PLZ GIVE ME LINK AS SOON AS POSSIBLE.
    THANKS IN ADVACE.

    Hello

    Have you checked the installation manual?

    Windows 7 is not supported and you should go with a certified operating system.

    Thank you
    Hussein

  • Oracle 10g se &amp; 10g application server installation conflict port 1521

    Hello

    I use Windows server 2003 and I had previously installed Oracle 10 g Standard Edition for Hyperion 11.1.1.3.

    now, I want to install Oracle 10 g application server.

    But when I tried to install Oracle 10 g application server, sound suspends with the oracle 10g database server in port 1521.

    Is it possible to install Oracle 10 g Standard Edition and Oracle 10g application server in Windows server 2003?

    Help please.

    Hervé M

    Yes, it is possible to make them together.
    In cases where the port 1521 is busy, try 1522.

    AMN

  • Change the clause where in a datablock

    I want to change the clause where in a datablock shaped 10g
    I want that to_date(champdb,'dd/mm/yyyy') =: champforms
    I do
    set_block_property ('filling', DEFAULT_WHERE, 'to_date(dateplomb,'dd/mm/yyyy') = decode(:dateplombage,null,DATEPLOMB,'||:dateplombage||')');
    set_block_property('plombage',DEFAULT_WHERE , 'trunc(dateplomb) = decode(:dateplombage, null , trunc(dateplomb),:dateplombage)');
    
  • File icon in the form of oracle 10g

    HII,

    I'm a new user in oracle 10g, here I am in form & placing all the icons in a folder, after that I changed the path to the icon file in the default.env file, the path is same where are preserved icons, but I am unable to see the icons running.

    what I need to change another file or icons will be kept somewhere particaular?

    Help, please...

    Hmmmmmm

    Please see different gif icons and do not attempt to set jpg, tiff or bmp please just try to check Gif icons.

    Sarah

Maybe you are looking for

  • No reason to go to El Capitan Yosemite?

    I am running OS X Yosemite v. 10.10.5 on MacBook Pro (15-inch, 2.53 GHz, mid 2009). Works very well. Is there a reason to upgrade to El Capitan?

  • option of games in the programs toolbar is empty. How to enable it in windows xp?

    The games is to start-> programs-> games is empty is to say, there are no options like Solitaire, Free Cell, etc. are not provided.I tried to turn on accessories options Add Remove Windows, but it asks me to load the windows xp cd, is not what ID is

  • No cursor when phone rings

    When my Z2 rings I don't get the cursor, only a screen empty. The green light flashes at the top, but I can't answer the phone. Suggestions, please?

  • Paper key to blackBerry for Blackberry Smartphones?

    I was typing in a number on the phone the other day, and then I pressed the call button so that it registers on my call log and I can add address later but when I went in the call log, the number wasn't there.  I know there are other methods to add i

  • TaskFlow question

    Hellostubborn taskflow xml can be slid on the jsf or jspx as a region page.but can you also drag and drop taskflow bounded on file JSFF?