Difference in the number of records for the same date - 11 GR 2

Guy - 11 GR on Windows2005 2, 64-bit.

BILLING_RECORD_KPN_ESP - is a monthly partitioned table.
BILLING_RECORD_IDX #DATE - is a local index on "charge_date" in the table above.

SQL > select / * + index (BILLING_RECORD_KPN_ESP BILLING_RECORD_IDX #DATE) * /.
2 (trunc (CHARGE_DATE)) CHARGE_DATE;
3 count (1) Record_count
4. IN "RATOR_CDR". "" BILLING_RECORD_KPN_ESP ".
where the 5 CHARGE_DATE = January 20, 2013.
Group 6 by trunc (CHARGE_DATE)
5 m

CHARGE_DATE RECORD_COUNT
------------------ ------------
2401 20 January 13-> > some records here.

-> > Here I can see only '2041' records for Jan/20. But in the query below, it shows "192610" for the same date.

Why is this difference in the number of records?

SQL > select / * + index (BILLING_RECORD_KPN_ESP BILLING_RECORD_IDX #DATE) * /.
(trunc (CHARGE_DATE)) CHARGE_DATE,
2 count (1) Record_count
3. FOR "RATOR_CDR." "" BILLING_RECORD_KPN_ESP ".
"4 where CHARGE_DATE > 20 January 2013."
Group of 5 by trunc (CHARGE_DATE)
6 order by trunc (CHARGE_DATE)
5 m

CHARGE_DATE RECORD_COUNT
------------------ ------------
192610 20 January 13-> > more records here
JANUARY 21, 13 463067
JANUARY 22, 13 520041
23 JANUARY 13 451212
JANUARY 24, 13 463273
JANUARY 25, 13 403276
JANUARY 26, 13 112077
27 JANUARY 13 10478
28 JANUARY 13 39158

Thank you!

Because in the second example you also select rows that have a nonzero component.

The first example selects only rows that are 00:00:00

(by the way, you should ask questions like this in the forum SQL)

Tags: Database

Similar Questions

  • DTS moves to the same data store

    Greetings,

    We are short v5.5u1 esxi and vcenter device with DTS clusters installation using thresholds to space only at this time. We do not limit our VM to place records on the same data and store, and in view of the virtual machine can have his records scattered across data warehouses in a cluster of the DS.

    We have many events that seem to do nothing is represented below.  Everyone agrees that something actually happens or vcenter turns his wheels?

    Thank you

    Ron

    Just answered my own question... it has to do with my scattered placement of vmdk. Since the vmx file lives on a given data store, the event shows that the activity... However if you check the DTS tab for the cluster data store you will find the disks associated with the virtual machine on other data warehouses were actually moved.

  • How to create two different smart albums with photos with the same date?

    I created a smart album by using 'Date is' and ' keyword is EAA.»  (The photos have a keyword like "EAA" or "Flower".  Photos of keyword EAA & flower have the same date.)  When I use "Corresponding to all" are has no pictures in the album.  When I use "Match any" all the photos are in the album - EAA & flower.  I would like an album with only pictures of CEA for that date and another album with photos of flower with the same date.

    I get the same answer.  I can get the date and to a key word to work with 'all' selected, but not date and keywords.  So you will need two smart albums: one with date and ECA ('all' selected) and the other with date and flowers ('all' selected).

    Use the file menu option ➙ new Smart Album.

    Report the problem to Apple via https://www.apple.com/feedback/photos.html.

  • 2 applications on the same data source vs different data sources

    Hello

    What is the difference between having 2 planning applications on the same data source with the same user on the DB and with each on a separate user name and the new data source?

    I have no problem space or privileges on the two schemas of the DB. I just want to know what the best technically?

    Thank you

    You need a separate data by application source otherwise each application will overwrite the other that they will share the same relational tables, if you want the planning application to work properly then two apps = two data sources

    See you soon

    John

    http://John-Goodwin.blogspot.com/

  • How to identify columns that have the same data in a SQL query or function?

    Deal all,

    How to identify columns that have the same data in a SQL query or function? I have the sample data as below

    DEPT_IDEMP_IDCome on
    !CITYSTATECOUNTRY111 June 1983DELHIHUMAN RESOURCESIndia1218 January 1987DELHIHUMAN RESOURCESIndia1328 November 1985DELHIHUMAN RESOURCESIndia144 June 1985DELHIHUMAN RESOURCESIndia255 June 1983MUMBAIHDIndia266 June 1983MUMBAIHDIndia277 June 1983MUMBAIHDIndia288 Jun. 1983MUMBAIHDIndia399. June 1983GURGAONDLIndia31010 June 1983GURGAONDLIndia

    Now, I want to Indify columns that have the same data for the same Department ID.

    Is it possible in sql unique or do I have to write the function for this? Pls Help how to write?

    Thanks in advance.

    You can try this?

    WITH T1)

    DEPT_ID, EMP_ID, DATE OF BIRTH, CITY, STATE, COUNTRY

    ), ()

    SELECT 1, 1, TO_DATE('1.) June 1983', 'JJ. LUN. (YYYY'), 'DELHI', 'HR', 'INDIA' OF THE DUAL UNION ALL

    SELECT 1, 2, TO_DATE('18.) January 1987', 'JJ. LUN. (YYYY'), 'DELHI', 'HR', 'INDIA' OF THE DUAL UNION ALL

    SELECT 1, 3, TO_DATE('28.) November 1985', 'JJ. LUN. (YYYY'), 'DELHI', 'HR', 'INDIA' OF THE DUAL UNION ALL

    SELECT 1, 4, TO_DATE('4.) June 1985', 'JJ. LUN. (YYYY'), 'DELHI', 'HR', 'INDIA' OF THE DUAL UNION ALL

    SELECT 2.5, TO_DATE('5.) June 1983', 'JJ. LUN. (YYYY'), 'BOMBAY', 'HD', 'INDIA' OF THE DUAL UNION ALL

    SELECT 2.6, TO_DATE('6.) June 1983', 'JJ. LUN. (YYYY'), 'BOMBAY', 'HD', 'INDIA' OF THE DUAL UNION ALL

    SELECT 2.7, TO_DATE('7.) June 1983', 'JJ. LUN. (YYYY'), 'BOMBAY', 'HD', 'INDIA' OF THE DUAL UNION ALL

    SELECT 2.8, TO_DATE('8.) June 1983', 'JJ. LUN. (YYYY'), 'BOMBAY', 'HD', 'INDIA' OF THE DUAL UNION ALL

    SELECT 3, 9, TO_DATE('9.) June 1983', 'JJ. LUN. (YYYY'), 'GURGAON', 'DL', 'INDIA' OF THE DUAL UNION ALL

    SELECT 3.10, TO_DATE('10.) June 1983', 'JJ. LUN. (YYYY'), 'GURGAON', 'DL', 'INDIA' OF THE DOUBLE)

    SELECT DEPT_ID,

    RTRIM (XMLAGG (XMLELEMENT(A,VALS||',')). Extract ('//Text ()'), ',') COLUMNS_WITH_DUPLICATE

    DE)

    SELECT * FROM)

    SELECT DEPT_ID,

    EMP_ID,

    Date of birth

    CITY,

    STATE,

    COUNTRY

    DE)

    SELECT DEPT_ID,

    EMP_ID,

    Date of birth

    CITY,

    STATE,

    COUNTRIES,

    COUNT (*) OVER(PARTITION BY DEPT_ID ORDER BY EMP_ID DESC,DOB DESC,CITY DESC,STATE DESC, COUNTRY DESC) RN

    DE)

    SELECT DEPT_ID,

    CASE WHEN(CEID>1) AND THEN 'YES' ELSE 'NO' END AS EMP_ID.

    CASE WHEN(CDOB>1) THEN 'YES' ELSE 'NO' END AS DATE OF BIRTH,

    CASE WHEN(CCITY>1) AND THEN 'YES' ELSE 'NO' END AS CITY.

    CASE WHEN(CSTATE>1) AND THEN 'YES' ELSE 'NO' END AS STATE.

    CASE WHEN(CCOUNTRY>1) THEN 'YES' ELSE 'NO' END AS A COUNTRY

    DE)

    SELECT DISTINCT

    DEPT_ID,

    CEID,

    CDOB,

    CITY,

    CSTATE,

    CCOUNTRY

    DE)

    SELECT DEPT_ID,

    COUNT (*) TO THE CEID (DEPT_ID PARTITION, EMP_ID),.

    COUNT (*) ON CDOB (DEPT_ID SCORE, DATE OF BIRTH),

    COUNT (*) ON THE CITY (DEPT_ID PARTITION, CITY),

    COUNT (*) ON CSTATE (DEPT_ID PARTITION, STATE).

    COUNT (*) ON CCOUNTRY (DEPT_ID, COUNTRY PARTITION)

    FROM T1)))

    WHERE RN = 1)

    UNPIVOT (CLO FOR (VALS) IN (EMP_ID, DATE OF BIRTH, CITY, STATE, COUNTRY)))

    WHERE COLS = "YES".

    DEPT_ID GROUP;

    OUTPUT:

    DEPT_ID COLUMNS_WITH_DUPLICATE
    --------- ------------------------

    1 CITY, COUNTRY, STATE
    2 CITY, COUNTRY, STATE
    3 CITY, COUNTRY, STATE

    Post edited by: Parth272025

  • ESXi 5.0 servers don't recognize that same NFS share to the same data store

    I have a setup of vSphere 5.0 running VMware Workstation 8.  I have two ESXi servers that are accumulating the same NFS share (with the same IP address and the same directory path), but for some reason, they don't recognize it as the same data store.  I deleted and added to the data store again and checked that I am getting the same way on both nodes.  However, vSphere don't let me use the same name when I ride sharing NFS as a data store on the second node. vSphere changes the name of "NFSdatastore" to "NFSdatastore (1)" and will not let me change, say that the name already exists.

    The NFS file server is a VM of 2.99 OpenFiler, which IP 192.168.0.100 (and is in DNS as "openfiler1").  The path is "/ mnt/vsphere/vcs/datastore.

    The NFS mount works great as a data store on the two servers ESXi, except for the fact that vSphere sees two data stores.  I have a Red Hat VM running on each of them, and when I browse the data of each ESXi Server store, I can definitely see two configs VM, as well as a few ISO images that I put on the NFS share.  However, I can't vMotion as he complains about not being able to access the configuration file and the file virtual disk (vmdk) of the other node.

    On the OpenFiler, the directory/mnt/vsphere/vcs/datastore is the property of "ofguest" in the "ofguest" group, and the permissions are "drwxrwsrwx +".  All files under the directory are also held by "ofguest" in the group "ofguest".  Vmx files have permissions "rwxr-xr-x + ', and the vmdk files have permissions ' rw +-

    I did a lot of Google search, read best practices, etc.  Any help is appreciated.

    UPDATE: he Figured out - leakage / on one of the paths of NFS mounting.  DOH!

    Maybe this can help you:

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalID=1005930

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalID=1005057

    Concerning

  • 2 writers can add to the same data staged?


    Hello

    How can we get 2 entries to write on the same data staged without data loss? I need to write the rejected records to a staging of data in 2 different processes before exporting.

    Kind regards

    Ravi

    No, you can not do this. Ecrire write to different sets of data on stage, then use a process with the merge data stream to bring together them.

    Otherwise, use two different sets of data staged or data interfaces and add to export. Data interfaces means that you never staged. The staged data: you can choose whether or not to step in the configuration of the task (or run profile).

  • Multiple ESX servers to access the same data store

    We connect our ESX servers to an Equallogic SAN iSCSI using VMWare iSCSI card.   I have a data store that has ISO files to store.   So far, I can connect only this data to an ESX Server store on time.  I have to disconnect an and connect manually to the other.  We currently have a facility relatively bare bones (don't have vCenter again, grouping, etc.).

    Is there anyway to connect the same data store to multiple ESX servers?  I tried to adjust the volume of Equallogic SAN for read only (since I just need to read ISO files), but I can't connect to ESX servers when I do this.

    Remember that the volume is enabled for clustering.

    From v4.x Equallogic firmware, there is an option advanced on each volume.

    André

  • Why PES 10 Organizer jumble of photos at the same date in different places?

    I have 10 PSE installed on a PC with Windows 7. My camera is a Nikon D90 using a Sandisk 8 gb SD card. When I take pictures in different places at the same date and download in the organiser, rather than keep the photos in different places together depending on the place, there the words all this. It does not keep the in order of time from the first to the last for that day, it just mix everything in a random order. Why?

    Hello

    Although we got by.

    What I've noticed, is that you are in the folder view and no thumbnail.

    In the PES 10 folder, the sort order is by filename - [in PES 11 is by date and time with respect to the miniature display].

    If you are going to display-> display file names and check, displayed under thumbnails - will appear in the order?

    Normally it is numbered in the right order-, you renamed photos?

    If it was me, I create two tags, Holyrood and Britania and apply them to appropriate pictures. Then switch to thumbnail view and filter by tag.

    Brian

  • Need to create a new line in the table with the same data as the primary key, but new PK

    Hello gurus,

    I have a table with a column as a primary key, I need to create a new row in the table, but with the same data in one of the lines, but with different primary keys, focus a double row with key primary diferent...

    Any ideas of how it can be done without much complication?

    Thanks in advance for your answer.

    Agress,
    Karim idrissi

    user9970447 wrote:
    Hello gurus,

    I have a table with a column as a primary key, I need to create a new row in the table, but with the same data in one of the lines, but with different primary keys, focus a double row with key primary diferent...

    Any ideas of how it can be done without much complication?

    Thanks in advance for your answer.

    Agress,
    Karim idrissi

    something like

    insert into mytable values ('literal for new pk',
                                           select non-pk-1,
                                                    non-pk-2,
                                                    non-pk-n
                                           from mytable
                                           where pk-col = 'literal for existing pk')
    
  • Guest with 2 rows on the same data

    Hello..

    I got the task to compare the data of 2 months.

    I want to choose these months in a command prompt with 2 rows of type drop-down list which get on the same data.

    (I don't want to use a multi-select-box, because I write the values in variables).

    the problem is that guests get the same value and do not have the correct variables, when I push the go button.


    anyone has a solution for my problem.

    or an idea how to solve the demand?

    Greetz

    Hello. Do not use is between. Use separate guests. You can then define each variable.

    Try this in the dash prompt (in the form of changing column):

    Months of:
    cases where 1 = 2 then "at other TIMES. End CALENDAR_MONTH_DESC
    Presentation set variable pv_month_from

    You add the second line of the month:

    Months to:
    cases where 1 = 2 then "at other TIMES. End CALENDAR_MONTH_DESC
    Presentation set variable pv_month_to

    In responses set manually filter filter:
    "DimTable.month_desc_column between ' @{pv_month_from}' and ' @{pv_month_to}"

    Concerning
    Goran
    http://108obiee.blogspot.com

  • I follow from the same date over and over again. And it updates successfully whenever I sign in my computer.

    I follow from the same date over and over again.  And it updates successfully whenever I sign in my computer.   Or I can click on windows update and update the same thing again.  Some miuutes or a fews seconds it will say I need to update my computer again.  I updated the same 25 times.  How can I stop this.

    Hello

    I suggest you follow the steps in the link below and check if it helps:

    http://support.Microsoft.com/kb/910339

    It will be useful.

  • Why a pdf form deletes the same data when they are saved?

    Why a pdf form deletes the same data when they are saved?

    As it has been said, in preferences, JavaScript tab. The first entry activates / deactivates JavaScript.

    (just remember to reactivate after making your tests).

    I hope this can help.

    Max Wyss.

  • Thickness of thin formatting on the same data store?

    Hi all

    is it possible with vCenter to convert thick to thin disc on the same data store format?

    and how?

    Thank you very much

    VMware KB: Change the thick or thin provisioning of a virtual disk

    Please check the useful and accurate.

    Marc

  • I have created a complete either form, with fields to interrogate.  When a test the form and enter the date in a field - it automatically inserts the SAME date in all other areas. How do fix you this?

    I created a form to fill in professional, with several fields.  When I try the form and enter data in a field - it fills the SAME data in all other fields.

    Give a unique name to each field.

Maybe you are looking for

  • Door-key, do not sync with icloud

    After that install OS X El Capitan new keychain on mac OS X is not sync with icloud Keychain, what can I do to restore my trousseau?

  • The browser does not start after you have turned off and turned on the computer

    The browser does not start after you have turned off and turned on the computer. I tried to remove the program entirely (as well as personal preferences), to create a new account, install a different browser versions. All this has not helped. (I have

  • Satellite Pro 4600 W2k for WinXP - broken graphics update

    When you use Win 2000, graphics for Everquest (game online program worked well). After the upgrade to Win XP, the graphics are broken (the pixels don't match). Can not enter the game. We have Trident Cyberblade Graphics Card. How can I make my graphi

  • error message: igfxmbk32.exe app.name is this a virus?

    When connected to the internet through dial-up modem, my browser doesn't load web pages no, it says "lost" or "cannot find 'server', but my modem works and I'm always connected to the internet.  Initially it might load the web site and I could stay f

  • Backup Seagate on 64-bit Windows Vista computer

    I got Seagate Backup works on another computer and now I want to use it on my 64 bit Vista computer, but when I try to install the Seagate Manager Installer program says it requires that my computer is running on Windows Vista 32 bit.  Is there a way