How to report the absence of a record?

I have the table and lets say this is like this:
StartTime,   DATE
EndTime,   DATE
Count,   NUMBER 16
Description,   VARCHAR 24
How can I do a search I said the days when I have NO data? And have it printed on these days for me?

This is the current code, except that I must eyeball to find the days with missing data (and of course I can miss things!... for not to mention sound inducing headache):
select 
    TO_CHAR(table_name.startTime,'MON-DD') as Day,
    SUM(count) as "Total Items"
from 
    table_name
where 
   ((table_name.startTime > to_date ('03-02-09 00:00:00', 'MM-DD-YY HH24:MI:SS')) 
    AND (table_name.startTime < to_date ('06-09-09 00:00:00', 'MM-DD-YY HH24:MI:SS'))) 
    AND description like '%6262%'
 
group by 
    TO_CHAR(table_name.startTime, 'MON-DD')
order by
    TO_CHAR(table_name.startTime, 'MON-DD')

You have to build yourself a calendar and an outer join so that for your data...

for example

SQL> ed
Wrote file afiedt.buf

  1  with emps as (select * from emp where to_char(hiredate,'YYYY') = '1981') -- all emps hired in 1981
  2      ,cal as (select min_hiredate+rownum-1 as hiredate
  3               from (select min(hiredate) min_hiredate, max(hiredate) as max_hiredate from emps)
  4               connect by rownum <= (max_hiredate-min_hiredate) + 1)
  5  --
  6  select cal.hiredate, emps.empno, emps.ename, emps.sal, emps.hiredate
  7  from cal left outer join emps on (emps.hiredate = cal.hiredate)
  8* order by cal.hiredate
SQL> /

HIREDATE         EMPNO ENAME             SAL HIREDATE
----------- ---------- ---------- ---------- -----------
20-FEB-1981       7499 ALLEN            1600 20-FEB-1981
21-FEB-1981
22-FEB-1981       7521 WARD             1250 22-FEB-1981
23-FEB-1981
24-FEB-1981
25-FEB-1981
26-FEB-1981
27-FEB-1981
28-FEB-1981
01-MAR-1981
02-MAR-1981
03-MAR-1981
04-MAR-1981
05-MAR-1981
06-MAR-1981
07-MAR-1981
08-MAR-1981
09-MAR-1981
10-MAR-1981
11-MAR-1981
12-MAR-1981
13-MAR-1981
14-MAR-1981
15-MAR-1981
16-MAR-1981
17-MAR-1981
18-MAR-1981
19-MAR-1981
20-MAR-1981
21-MAR-1981
22-MAR-1981
23-MAR-1981
24-MAR-1981
25-MAR-1981
26-MAR-1981
27-MAR-1981
28-MAR-1981
29-MAR-1981
30-MAR-1981
31-MAR-1981
01-APR-1981
02-APR-1981       7566 JONES            2975 02-APR-1981
03-APR-1981
04-APR-1981
05-APR-1981
06-APR-1981
07-APR-1981
08-APR-1981
09-APR-1981
10-APR-1981
11-APR-1981
12-APR-1981
13-APR-1981
14-APR-1981
15-APR-1981
16-APR-1981
17-APR-1981
18-APR-1981
19-APR-1981
20-APR-1981
21-APR-1981
22-APR-1981
23-APR-1981
24-APR-1981
25-APR-1981
26-APR-1981
27-APR-1981
28-APR-1981
29-APR-1981
30-APR-1981
01-MAY-1981       7698 BLAKE            2850 01-MAY-1981
02-MAY-1981
03-MAY-1981
04-MAY-1981
05-MAY-1981
06-MAY-1981
07-MAY-1981
08-MAY-1981
09-MAY-1981
10-MAY-1981
11-MAY-1981
12-MAY-1981
13-MAY-1981
14-MAY-1981
15-MAY-1981
16-MAY-1981
17-MAY-1981
18-MAY-1981
19-MAY-1981
20-MAY-1981
21-MAY-1981
22-MAY-1981
23-MAY-1981
24-MAY-1981
25-MAY-1981
26-MAY-1981
27-MAY-1981
28-MAY-1981
29-MAY-1981
30-MAY-1981
31-MAY-1981
01-JUN-1981
02-JUN-1981
03-JUN-1981
04-JUN-1981
05-JUN-1981
06-JUN-1981
07-JUN-1981
08-JUN-1981
09-JUN-1981       7782 CLARK            2450 09-JUN-1981
10-JUN-1981
11-JUN-1981
12-JUN-1981
13-JUN-1981
14-JUN-1981
15-JUN-1981
16-JUN-1981
17-JUN-1981
18-JUN-1981
19-JUN-1981
20-JUN-1981
21-JUN-1981
22-JUN-1981
23-JUN-1981
24-JUN-1981
25-JUN-1981
26-JUN-1981
27-JUN-1981
28-JUN-1981
29-JUN-1981
30-JUN-1981
01-JUL-1981
02-JUL-1981
03-JUL-1981
04-JUL-1981
05-JUL-1981
06-JUL-1981
07-JUL-1981
08-JUL-1981
09-JUL-1981
10-JUL-1981
11-JUL-1981
12-JUL-1981
13-JUL-1981
14-JUL-1981
15-JUL-1981
16-JUL-1981
17-JUL-1981
18-JUL-1981
19-JUL-1981
20-JUL-1981
21-JUL-1981
22-JUL-1981
23-JUL-1981
24-JUL-1981
25-JUL-1981
26-JUL-1981
27-JUL-1981
28-JUL-1981
29-JUL-1981
30-JUL-1981
31-JUL-1981
01-AUG-1981
02-AUG-1981
03-AUG-1981
04-AUG-1981
05-AUG-1981
06-AUG-1981
07-AUG-1981
08-AUG-1981
09-AUG-1981
10-AUG-1981
11-AUG-1981
12-AUG-1981
13-AUG-1981
14-AUG-1981
15-AUG-1981
16-AUG-1981
17-AUG-1981
18-AUG-1981
19-AUG-1981
20-AUG-1981
21-AUG-1981
22-AUG-1981
23-AUG-1981
24-AUG-1981
25-AUG-1981
26-AUG-1981
27-AUG-1981
28-AUG-1981
29-AUG-1981
30-AUG-1981
31-AUG-1981
01-SEP-1981
02-SEP-1981
03-SEP-1981
04-SEP-1981
05-SEP-1981
06-SEP-1981
07-SEP-1981
08-SEP-1981       7844 TURNER           1500 08-SEP-1981
09-SEP-1981
10-SEP-1981
11-SEP-1981
12-SEP-1981
13-SEP-1981
14-SEP-1981
15-SEP-1981
16-SEP-1981
17-SEP-1981
18-SEP-1981
19-SEP-1981
20-SEP-1981
21-SEP-1981
22-SEP-1981
23-SEP-1981
24-SEP-1981
25-SEP-1981
26-SEP-1981
27-SEP-1981
28-SEP-1981       7654 MARTIN           1250 28-SEP-1981
29-SEP-1981
30-SEP-1981
01-OCT-1981
02-OCT-1981
03-OCT-1981
04-OCT-1981
05-OCT-1981
06-OCT-1981
07-OCT-1981
08-OCT-1981
09-OCT-1981
10-OCT-1981
11-OCT-1981
12-OCT-1981
13-OCT-1981
14-OCT-1981
15-OCT-1981
16-OCT-1981
17-OCT-1981
18-OCT-1981
19-OCT-1981
20-OCT-1981
21-OCT-1981
22-OCT-1981
23-OCT-1981
24-OCT-1981
25-OCT-1981
26-OCT-1981
27-OCT-1981
28-OCT-1981
29-OCT-1981
30-OCT-1981
31-OCT-1981
01-NOV-1981
02-NOV-1981
03-NOV-1981
04-NOV-1981
05-NOV-1981
06-NOV-1981
07-NOV-1981
08-NOV-1981
09-NOV-1981
10-NOV-1981
11-NOV-1981
12-NOV-1981
13-NOV-1981
14-NOV-1981
15-NOV-1981
16-NOV-1981
17-NOV-1981       7839 KING             5000 17-NOV-1981
18-NOV-1981
19-NOV-1981
20-NOV-1981
21-NOV-1981
22-NOV-1981
23-NOV-1981
24-NOV-1981
25-NOV-1981
26-NOV-1981
27-NOV-1981
28-NOV-1981
29-NOV-1981
30-NOV-1981
01-DEC-1981
02-DEC-1981
03-DEC-1981       7900 JAMES             950 03-DEC-1981
03-DEC-1981       7902 FORD             3000 03-DEC-1981

288 rows selected.

SQL>

Tags: Database

Similar Questions

  • How to set the value of adjecent record

    Hello

    For an interactive report, I wanted to know, how set the value for one of the value column taken recording (the visible record in the report) adjecent to the same column in the current record.    The reason behind this requirement is, the table contains cirtain ID which is populated based on cirtain condition.  And the same ID must be set to adjecent different records.  Since this is event based on human evaluation of the data, I can not run the UPDATE command in the background.

    To simplify the requirement, suppose, report IR on the employee.  Based on the user, click one of the dummy 'comlumn link', the value COMMISSION_PERCENT must be copied to the next record.  If I know EMPLOYEE_ID value of the next record, then update SQL will do the job.  But how?

    Thank you

    -Anand

    Hi Anand,

    Please check the sample application you gave, I created the same according to your requirement.

    Here are the steps that I did.

    1. edition your column that you use as a button.

    A class has been added to this button under link attributes

    class="uButton cpycomm" role="button"
    

    URL: javascript:void (0);

    2. edited Page attributes

    Under run when the Page loads

     $("a.cpycomm").click(function(){
        var $el = $(this);
        var nextemp = $el.closest("tr").next().find('td[headers="C725254625175515007"]').text();
        var comm = $el.closest("tr").find('td[headers="C725255480705515009"]').text();
        $("#P1_EMPNO").val(nextemp);
        $("#P1_COMM").val(comm);
    
        if (confirm('Copy Commission to next record ?')) {
           apex.submit('SAVE');
        }
      });
    

    3. a process page to update the commision has created.

    Kind regards

    Jitendra

  • Satellite L650: How to use the microphone jack to record audio player

    How can I use the microphone to the input and the audio recording from a record player or a tape using the output of the headphone jack of the player?

    Output audio to the speakers is OK but record is severely distorted.
    OED017 of computer L650.

    Hello

    Taking microphone does not support line-in entry that allows to record the audio stream to a device.

    You can use the external microphone to record Mono sounds in your applications. It also allows to issue voice commands for applications that support these functions.

  • How to change the Windows Vista sound recorder

    Does anyone have information on how to editing can be done in sound recorder in Windows Vista, such as the removal of noise, etc. ?

    You would not be able to change the sound by using the Windows Vista sound recorder after recording is done, you would need a different for that one application. In this case, you can instead to fix the problem before registration, you can refer to the link below to get instructions on how to reduce POPs, clicks or other distortions.

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

    For more information about how to troubleshoot audio recording in Windows Vista, you can check the link below as well.

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-audio-recording-problems

  • How to get the original number multi-record block registration

    Hi all


    I know how to find the item duplicated in several record block.

    For Ex:
    Line_Num            Item_Name             Quantity
    1                           AA                      10
    2                           BB                      20
    3                           AA
    Here record 3rd nom_element is duplicated, I can able to check and display the message that "point is duplicated", I found [sheikyerbouti.developpez.com/duplicates/duplicates.htm].

    but I want to show as well as the original line to be number 1 when the nom_element came.

    Here I want to check the original Line_Num and display the message

    "Item is duplicated, update quantity in the original 1' line."

    Can someone help me find it?
    Thank you.

    Kind regards
    Guru.

    In the following key trigger write code like this I think it will help you

    declare
    v_Text varchar2 (20);
    NUMBER OF V_REC;
    BEGIN
    v_Text: =: test;
    V_REC: =: SYSTEM. CURSOR_RECORD;
    premier_enregistrement;
    loop
    If v_text =: test V_REC AND <> : SYSTEM. CURSOR_RECORD then
         
    GO_RECORD(:SYSTEM.) CURSOR_RECORD);
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
    NEXT_RECORD;
    END LOOP;
    GO_RECORD (V_REC); NEXT_RECORD;
    -v_Text: = NULL;
    EXCEPTION
    WHEN FORM_TRIGGER_FAILURE THEN
    RAISE FORM_TRIGGER_FAILURE;
    END;

  • How to count the number of data records?

    Hey guys, how to count the number of records, I had on a data object variable?

    Im having a result of sql query in a variable like this:

    oDB.resolveNode("#command").query.select.value = "SELECT * FROM Customers WHERE CliNombre LIKE ' % ' + input1 +" %' ";

    oDB.open ();

    oDB.first ();

    So I need to count the number of records retrieved by this SQL query at the moment. Help please

    Then move the cursor back to the first record after you have your account.

    There is a keyword count in SQL that will allow you to get the account of your request. You can run that first - get your account, and then run the actual query to get the Recordset. This would require a separate data connection. Some examples of code.

    var xfa.event.newText = inName;
    If (inName == "") {}
    App.Alert ("you must enter a name--try again!")
    }
    var nIndex = 0;
    While (xfa.sourceSet.nodes.item (nIndex) .name! = "DataConnection2")
    {
    nIndex ++;
    }

    oDB = xfa.sourceSet.nodes.item (nIndex) .racing var (1); pertaining to the specified data connection node
    App.Alert (ODB.saveXML ("Pretty"));

    var nIndex = 0;
    While (xfa.sourceSet.nodes.item (nIndex) .name! = "DataConnection3")
    {
    nIndex ++;
    }
    var oDBCount = xfa.sourceSet.nodes.item (nIndex) .racing (1); pertaining to the specified data connection node
    Configure sql call DB to get the number of records that match the criteria

    oDBCount.nodes.item (1).query.setAttribute ("text", "commandType");
    oDBCount.nodes.item (1).query.select.nodes.item (0) .value = "Select count (*) from table1 where AcctNumber = '" + inName + "'";
    oDBCount.open)
    oDBCount.close)

    Configure sql call DB to get the specified employee number

    oDB.nodes.item (1).query.setAttribute ("text", "commandType");
    oDB.nodes.item (1).query.select.nodes.item (0) .value = "Select * from table1 where AcctNumber = '" + inName + "'";
    App.Alert (ODB. Nodes.Item (1) .saveXML ("Pretty"));

    now connect to the DB and get a recording
    oDB.open)
    oDB.close ();

    Note the SQL command use the keyword count (take a look at the oDBCount section). This will return a number of return to the cllaer. When I set up the data connection, a node count (*) that appeared there. I dragged to the form and it has created a field called count that the onus at this node. When the query is executed, the number of resulting records returns to this field. You can have hidden it so that your users can not see it and also to change the binding votes to zero, so it is not included in the data file that is submitted when the form is complete.

    Paul

  • How to check the values in multi-record block. ?

    Hello

    I'm new to forms. I have the field titled "Comments" in the block of multi-record. I have a button called "reject". Reject button is in the control block. If I press the button reject, field comments must be entered in one of the record. Otherwise, he should tell message. How to check the multi-record block. ?

    Pl.Help.

    Thanks in advance.
    Mano

    Mano,

    Add NEXT_RECORD just before the END of the LOOP.

         GO_BLOCK('');
         FIRST_RECORD;
         LOOP
              IF NVL(:., ' ' ) = ' ' THEN
                   MESSAGE('');
                   RAISE FORMS_TRIGGER_FAILURE;
              END IF;
              EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
              NEXT_RECORD;
         END LOOP;
    

    Kind regards

    Manu.

    If my response or response from another person was helpful, please mark accordingly

  • How to report the BIOS problem?

    Hello

    is it possible to report the BIOS problem so that a person of HP it will read and the problem will be solved if all goes well?

    To be concrete, there seems to be problem in BIOS F.02 installed on HP Mini 5103 causes of freeze if it has plugged the USB key with 'recursive partitioning' at startup. As a result, it is not possible to boot from live USB which was created from some ISO hybrids (e.g. direct ISOs of OpenSUSE recent). Since there are not many options to install the system on netbook, I think it is serious problem. My previous netbook Lenovo Ideapad S10 - 3 and also my work laptop and desktop have no problem to start with the USB stick containing "recursive partitioning", so it's certainly a problem (hopefully not feature) this concrete machine/BIOS.

    Thank you

    That's ok on the Bravo, I did nothing to help you again.  This link is for questions of security, but it is also for the firmware, so you can get away with sending them a note here:

    https://h41268.www4.HP.com/live/index.aspx?QID=11503

    - Or call them.

    http://welcome.HP.com/country/us/en/contact/phone_assist.html#section1

  • How to report the advertising Chinese on the AppStore

    Recently, there are many Chinese like to advertise on the AppStore (in the Chinese section). Here is the sample application.

    These Chinese advertisers publishes their ads of almost any application (if the application is popular). And they usually announce an application called «WeChat "(微信).» It extremely annoys people again!       How can I report them?

    Howdy MasterChief

    I had to look it up!

    Add a comment or leave a note in the iTunes Store or App Store - Apple Support

    • You have to find one of these 'elements' in iTunes Store in iTunes App - device iOS or Mac or PC (my example below)
    • Choose the item
    • Choose 'add a comment '.
    • attend the bottom right and choose > "report a problem".

  • How to read the heart rate data recorded by the Apple Watch?

    My wife wears a Apple Watch and suffer from power cuts irregulars. After the last of them, I checked the data through the health app and saw that at the time of the blackout, there seems to be no saved data. A range of heart rate was recorded both before and after the blackout. Can someone explain how the data record? Thank you

    MIchael Gilmore

    This explains the various triggers causing the heart rate measure:

    Measure your heart rate with your Apple Watch - Apple Support

    Here is some additional information:

    Your heart rate. What it means, and where on Apple Watch you will find. -Apple Support

  • How to reorganize the playlists on their record?

    How can I reorganize or get an alphabetical sort playlist in a specific folder in Itunes? I feel like it did automatically alphabetize, but lately

    It added the new playlist last in the folder... ideas? To be precise, I don't speak of reorganization of the songs in playlists,

    but put individual playlists alphabetically in folders...

    I had the same problem, not only with the playlists, but also with the playlist files. When adding to a pre-existing folder, a new always falls down. Today, I discovered the selections and records (or better subfolders) go the correct position after you close iTunes and make a complete alphabetical output. When iTunes has again, I found the new playlists and folders in the correct position.

    I use OS X El Capitan 10.11.2 and iTunes 12.3.2.35.

    Good luck.

  • How to report the ip address resolved of nslookup as a variable in the batch script

    I have a batch script that performs a constant audit 'external server' living every minute and the activity is fed into a log file. The external server is on a dynamic ip address.

    for example,.

    Logfile = C:\Logfile.txt

    echo control myserver... > Logfile

    .

    .

    [see document test/myserver.domain.com]

    However, I would like to write in the log IP address that is being tested.

    That is to say

    the my_server checking to 123.456.78.9 echo

    Could someone tell how can I get the dns to resolve address from "myserver.domain.com' as a variable in order, can I use it

    for example,.

    RESOLVED_ADDRESS = (nslookup resolution results)

    the my_server % RESOLVED_ADDRESS % control echo

    Thank you

    Hi Jimimaseye,

    I suggest that you post the application on Microsoft TechNet forum because we have experts working on these issues. You can check the link to post the same query on TechNet:

    http://social.technet.Microsoft.com/forums/Windows/en-us/home?category=w7itpro

    Please do not hesitate to contact us if you have other questions related to Windows.

  • How to add the voice data on recorded voice file?

    Hello

    I'm working on control of voice (RecordControl interface) recorder in BlackBerry.
    I would like to add the voice on file already saved data.

    Is it possible to add new data on the already saved file? or any other solution to add the data of voices on the already saved the file?

    Thank you

    Sohail

    No worries mate.

  • How to report the thread in the wrong space?

    Hello, where can I report that a thread is in the wrong space or subspace?

    Is this the correct subspace or do I have to write to any host?

    Thanks to advice.

    On the wire, use the "report abuse" in the Actions panel and indicate that the thread is in the wrong place (and if you know where to go it would be useful that the moderators cannot know everything).

  • How to get the first and last record

    Hai All

    I have a table called T1 and there are more than 8 lakhs Archives and I have a column named Timestamp, so I need to get the first record value and time stampvalue and last record and time stamp value so that I can conclude that for example
    form June 13 to 15 June data are here


    Kind regards

    SrikkanthM

    What is the problem with:

    select min(timestamp),max(timestamp)
    from T1;
    

    ?

Maybe you are looking for