14 Replies Latest reply: Nov 22, 2012 4:15 PM by Marcus Rangel RSS

    Find the data based on week-end ,week-day

    925887
      Hi,

      Db : 11.2.0.1

      We have the table LX_CPU_TRACK_DLY

      desc LX_CPU_TRACK_DLY

      Name Null? Type
      ----------------------------------------- -------- ----------------------------
      SYSTEMDATE DATE
      HOST_NAME VARCHAR2(50 CHAR)
      USR_PRCT NUMBER(10,5)
      SYS_PRCT NUMBER(10,5)
      WAIT_PRCT NUMBER(10,5)
      IDLE_PRCT NUMBER(10,5)
      PHYS_CPU_USD NUMBER(10,5)
      RUN_Q NUMBER(10,5)


      I want to fetch data based on week end(sat,sun) ,week day(mon-fri) on systemdate column for entire month in two seperate query.

      Any suggestions

      Thanks

      Edited by: 922884 on Nov 22, 2012 11:01 AM
        • 1. Re: Find the data based on week-end ,week-day
          Marcus Rangel
          Weekends: where to_char(SYSTEMDATE,'D') in (1,7)

          Weekdays: where to_char(SYSTEMDATE,'D') not in (1,7)

          1 = sunday, 2 = monday, ... 7 = saturday.

          Edited by: Marcus Rangel on Nov 22, 2012 6:45 PM
          • 2. Re: Find the data based on week-end ,week-day
            925887
            Hi,

            Thanks.

            I need to fetch data based on two timings on week day and week end basis.

            For Ex :
            we need data 5 am to 6 am on week days
            we need data 10 am to 14 pm on week ends.


            I tried bleow query

            SQL> select host_name,to_char(systemdate,'dd-mm-yyyy hh24:mi:ss') from cman.lX_CPU_TRACK_DLY where to_char(systemdate,'dd-mm-yy hh24:mi:ss') between '21-11-12 20:00:01' and '21-11-12 21:00:00' and host_name= ( select host_name from cman.lX_CPU_TRACK_DLY where host_name='ilm-25' and trunc(SYSTEMDATE,'D') in (1,7));
            select host_name,to_char(systemdate,'dd-mm-yyyy hh24:mi:ss') from cman.lX_CPU_TRACK_DLY where to_char(systemdate,'dd-mm-yy hh24:mi:ss') between '21-11-12 20:00:01' and '21-11-12 21:00:00' and host_name= ( select host_name from cman.lX_CPU_TRACK_DLY where host_name='ilm-25' and trunc(SYSTEMDATE,'D') in (1,7))
            *
            ERROR at line 1:
            ORA-00932: inconsistent datatypes: expected DATE got NUMBER

            Any suggestions

            Thanks
            • 3. Re: Find the data based on week-end ,week-day
              Marcus Rangel
              You are trying to perform date calculations with strings. Keep the TO_CHARs in the SELECT clause if you want to, but in the WHERE clause you should change this:
              where to_char(systemdate,'dd-mm-yy hh24:mi:ss') 
              between '21-11-12 20:00:01' and '21-11-12 21:00:00'
              into something like this:
              where systemdate between to_date('21-11-12 20:00:01', 'DD-MM-YY HH24:MI:SS') 
              and to_date('21-11-12 21:00:00', 'DD-MM-YY HH24:MI:SS')
              • 4. Re: Find the data based on week-end ,week-day
                Marcus Rangel
                Plus, my first suggestion should use strings:
                to_char(SYSTEMDATE,'D') in ('1','7')
                • 5. Re: Find the data based on week-end ,week-day
                  925887
                  Hi,

                  Thanks


                  we got the error.

                  SQL> select host_name,to_char(systemdate,'dd-mm-yyyy hh24:mi:ss') from cman.lX_CPU_TRACK_DLY where to_char(systemdate,'dd-mm-yy hh24:mi:ss') between '21-11-12 20:00:01' and '21-11-12 21:00:00' and host_name= ( select host_name from cman.lX_CPU_TRACK_DLY where host_name='ilm-25' and to_char(trunc(SYSTEMDATE,'D')) in ('1','7');
                  select host_name,to_char(systemdate,'dd-mm-yyyy hh24:mi:ss') from cman.lX_CPU_TRACK_DLY where to_char(systemdate,'dd-mm-yy hh24:mi:ss') between '21-11-12 20:00:01' and '21-11-12 21:00:00' and host_name= ( select host_name from cman.lX_CPU_TRACK_DLY where host_name='ilm-25' and to_char(trunc(SYSTEMDATE,'D')) in ('1','7')
                  *
                  ERROR at line 1:
                  ORA-00921: unexpected end of SQL command

                  Thanks
                  • 6. Re: Find the data based on week-end ,week-day
                    Marcus Rangel
                    Well, you have to open and close your parenthesis correctly for SQL to work.
                    • 7. Re: Find the data based on week-end ,week-day
                      Marcus Rangel
                      And really, those string calculations will blow up in your face sooner or later. Change them.
                      • 8. Re: Find the data based on week-end ,week-day
                        925887
                        Hi,

                        Thanks for your reply and wonderful help.

                        The table has data .Every minute a row inserted into the table.

                        I executed the below query but i got zero rows.

                        SQL> select host_name,to_char(systemdate,'dd-mm-yyyy hh24:mi:ss') from cman.LX_CPU_TRACK_DLY
                        2 where systemdate between to_date('20:00:01', 'HH24:MI:SS') and to_date('21:00:00', 'HH24:MI:SS')
                        3 and host_name= ( select host_name from cman.LX_CPU_TRACK_DLY where
                        4 host_name='ilm-25' and to_char(trunc(SYSTEMDATE,'D')) in ('1','7') );

                        no rows selected




                        Any suggestions

                        Thanks

                        Edited by: 922884 on 22 Nov, 2012 1:19 PM
                        • 9. Re: Find the data based on week-end ,week-day
                          Marcus Rangel
                          When you ask for "to_date('20:00:01', 'HH24:MI:SS')", what you get is this: "01/11/2012 20:00:01". Do you have any rows from November 1st ?
                          • 10. Re: Find the data based on week-end ,week-day
                            925887
                            Hi,

                            Thanks


                            We have 1620 rows on that day.

                            SQL> select SYSTEMDATE from cman.lX_CPU_TRACK_DLY where to_char(systemdate,'dd-mm-yy hh24:mi:ss') between '01-11-12 20:00:01' and '01-11-12 21:00:00'

                            SYSTEMDAT
                            ---------
                            01-NOV-12
                            01-NOV-12
                            01-NOV-12

                            1620 rows selected.


                            Thanks
                            • 11. Re: Find the data based on week-end ,week-day
                              Marcus Rangel
                              Can you run the one below and post the results ?
                              select host_name, 
                                     to_char(systemdate,'dd-mm-yyyy hh24:mi:ss') 
                              from   cman.LX_CPU_TRACK_DLY
                              where  systemdate between to_date('21/11/2012 20:00:01','DD/MM/YYYY HH24:MI:SS') 
                                                    and to_date('21/11/2012 21:00:00','DD/MM/YYYY HH24:MI:SS') 
                                and  to_char(trunc(SYSTEMDATE,'D')) not in ('1','7'); /* "NOT IN" because 21/11 was a wednesday */ 
                              • 12. Re: Find the data based on week-end ,week-day
                                925887
                                Hi,

                                Thanks


                                -------------------------------------------------- -------------------
                                ilm-426 21-11-2012 20:38:00
                                ilm-426 21-11-2012 20:39:00
                                ilm-426 21-11-2012 20:40:00
                                ilm-426 21-11-2012 20:41:00
                                ilm-426 21-11-2012 20:42:00
                                ilm-426 21-11-2012 20:43:00
                                ilm-426 21-11-2012 20:44:00
                                ilm-426 21-11-2012 20:45:00
                                ilm-426 21-11-2012 20:46:00
                                ilm-426 21-11-2012 20:47:00
                                ilm-426 21-11-2012 20:48:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-426 21-11-2012 20:49:00
                                ilm-426 21-11-2012 20:50:00
                                ilm-426 21-11-2012 20:51:00
                                ilm-426 21-11-2012 20:52:00
                                ilm-426 21-11-2012 20:53:00
                                ilm-426 21-11-2012 20:54:00
                                ilm-426 21-11-2012 20:55:00
                                ilm-426 21-11-2012 20:56:00
                                ilm-426 21-11-2012 20:57:00
                                ilm-426 21-11-2012 20:58:00
                                ilm-426 21-11-2012 20:59:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-426 21-11-2012 21:00:00
                                ilm-429 21-11-2012 20:01:00
                                ilm-429 21-11-2012 20:02:00
                                ilm-429 21-11-2012 20:03:00
                                ilm-429 21-11-2012 20:04:00
                                ilm-429 21-11-2012 20:05:00
                                ilm-429 21-11-2012 20:06:00
                                ilm-429 21-11-2012 20:07:00
                                ilm-429 21-11-2012 20:08:00
                                ilm-429 21-11-2012 20:09:00
                                ilm-429 21-11-2012 20:10:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-429 21-11-2012 20:11:00
                                ilm-429 21-11-2012 20:12:00
                                ilm-429 21-11-2012 20:13:00
                                ilm-429 21-11-2012 20:14:00
                                ilm-429 21-11-2012 20:15:00
                                ilm-429 21-11-2012 20:16:00
                                ilm-429 21-11-2012 20:17:00
                                ilm-429 21-11-2012 20:18:00
                                ilm-429 21-11-2012 20:19:00
                                ilm-429 21-11-2012 20:20:00
                                ilm-429 21-11-2012 20:21:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-429 21-11-2012 20:22:00
                                ilm-429 21-11-2012 20:23:00
                                ilm-429 21-11-2012 20:24:00
                                ilm-429 21-11-2012 20:25:00
                                ilm-429 21-11-2012 20:26:00
                                ilm-429 21-11-2012 20:27:00
                                ilm-429 21-11-2012 20:28:00
                                ilm-429 21-11-2012 20:29:00
                                ilm-429 21-11-2012 20:30:00
                                ilm-429 21-11-2012 20:31:00
                                ilm-429 21-11-2012 20:32:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-429 21-11-2012 20:33:00
                                ilm-429 21-11-2012 20:34:00
                                ilm-429 21-11-2012 20:35:00
                                ilm-429 21-11-2012 20:36:00
                                ilm-429 21-11-2012 20:37:00
                                ilm-429 21-11-2012 20:38:00
                                ilm-429 21-11-2012 20:39:00
                                ilm-429 21-11-2012 20:40:00
                                ilm-429 21-11-2012 20:41:00
                                ilm-429 21-11-2012 20:42:00
                                ilm-429 21-11-2012 20:43:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-429 21-11-2012 20:44:00
                                ilm-429 21-11-2012 20:45:00
                                ilm-429 21-11-2012 20:46:00
                                ilm-429 21-11-2012 20:47:00
                                ilm-429 21-11-2012 20:48:00
                                ilm-429 21-11-2012 20:49:00
                                ilm-429 21-11-2012 20:50:00
                                ilm-429 21-11-2012 20:51:00
                                ilm-429 21-11-2012 20:52:00
                                ilm-429 21-11-2012 20:53:00
                                ilm-429 21-11-2012 20:54:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-429 21-11-2012 20:55:00
                                ilm-429 21-11-2012 20:56:00
                                ilm-429 21-11-2012 20:57:00
                                ilm-429 21-11-2012 20:58:00
                                ilm-429 21-11-2012 20:59:00
                                ilm-429 21-11-2012 21:00:00
                                ilm-495 21-11-2012 20:01:00
                                ilm-495 21-11-2012 20:02:00
                                ilm-495 21-11-2012 20:03:00
                                ilm-495 21-11-2012 20:04:00
                                ilm-495 21-11-2012 20:05:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:06:00
                                ilm-495 21-11-2012 20:07:00
                                ilm-495 21-11-2012 20:08:00
                                ilm-495 21-11-2012 20:09:00
                                ilm-495 21-11-2012 20:10:00
                                ilm-495 21-11-2012 20:11:00
                                ilm-495 21-11-2012 20:12:00
                                ilm-495 21-11-2012 20:13:00
                                ilm-495 21-11-2012 20:14:00
                                ilm-495 21-11-2012 20:15:00
                                ilm-495 21-11-2012 20:16:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:17:00
                                ilm-495 21-11-2012 20:18:00
                                ilm-495 21-11-2012 20:19:00
                                ilm-495 21-11-2012 20:20:00
                                ilm-495 21-11-2012 20:21:00
                                ilm-495 21-11-2012 20:22:00
                                ilm-495 21-11-2012 20:23:00
                                ilm-495 21-11-2012 20:24:00
                                ilm-495 21-11-2012 20:25:00
                                ilm-495 21-11-2012 20:26:00
                                ilm-495 21-11-2012 20:27:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:28:00
                                ilm-495 21-11-2012 20:29:00
                                ilm-495 21-11-2012 20:30:00
                                ilm-495 21-11-2012 20:31:00
                                ilm-495 21-11-2012 20:32:00
                                ilm-495 21-11-2012 20:33:00
                                ilm-495 21-11-2012 20:34:00
                                ilm-495 21-11-2012 20:35:00
                                ilm-495 21-11-2012 20:36:00
                                ilm-495 21-11-2012 20:37:00
                                ilm-495 21-11-2012 20:38:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:39:00
                                ilm-495 21-11-2012 20:40:00
                                ilm-495 21-11-2012 20:41:00
                                ilm-495 21-11-2012 20:42:00
                                ilm-495 21-11-2012 20:43:00
                                ilm-495 21-11-2012 20:44:00
                                ilm-495 21-11-2012 20:45:00
                                ilm-495 21-11-2012 20:46:00
                                ilm-495 21-11-2012 20:47:00
                                ilm-495 21-11-2012 20:48:00
                                ilm-495 21-11-2012 20:49:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:50:00
                                ilm-495 21-11-2012 20:51:00
                                ilm-495 21-11-2012 20:52:00
                                ilm-495 21-11-2012 20:53:00
                                ilm-495 21-11-2012 20:54:00
                                ilm-495 21-11-2012 20:55:00
                                ilm-495 21-11-2012 20:56:00
                                ilm-495 21-11-2012 20:57:00
                                ilm-495 21-11-2012 20:58:00
                                ilm-495 21-11-2012 20:59:00
                                ilm-495 21-11-2012 21:00:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-500 21-11-2012 20:01:00
                                ilm-500 21-11-2012 20:02:00
                                ilm-500 21-11-2012 20:03:00
                                ilm-500 21-11-2012 20:04:00
                                ilm-500 21-11-2012 20:05:00
                                ilm-251 21-11-2012 20:01:00
                                ilm-251 21-11-2012 20:02:00
                                ilm-251 21-11-2012 20:03:00
                                ilm-251 21-11-2012 20:04:00
                                ilm-251 21-11-2012 20:05:00
                                ilm-251 21-11-2012 20:06:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-251 21-11-2012 20:07:00
                                ilm-251 21-11-2012 20:08:00
                                ilm-251 21-11-2012 20:09:00
                                ilm-251 21-11-2012 20:10:00
                                ilm-251 21-11-2012 20:11:00
                                ilm-251 21-11-2012 20:12:00
                                ilm-251 21-11-2012 20:13:00
                                ilm-251 21-11-2012 20:14:00
                                ilm-251 21-11-2012 20:15:00
                                ilm-251 21-11-2012 20:16:00
                                ilm-251 21-11-2012 20:17:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-251 21-11-2012 20:18:00
                                ilm-251 21-11-2012 20:19:00
                                ilm-251 21-11-2012 20:20:00
                                ilm-251 21-11-2012 20:21:00
                                ilm-251 21-11-2012 20:22:00
                                ilm-251 21-11-2012 20:23:00
                                ilm-251 21-11-2012 20:24:00
                                ilm-251 21-11-2012 20:25:00
                                ilm-251 21-11-2012 20:26:00
                                ilm-251 21-11-2012 20:27:00
                                ilm-251 21-11-2012 20:28:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-500 21-11-2012 20:06:00
                                ilm-500 21-11-2012 20:07:00
                                ilm-500 21-11-2012 20:08:00
                                ilm-500 21-11-2012 20:09:00
                                ilm-500 21-11-2012 20:10:00
                                ilm-500 21-11-2012 20:11:00
                                ilm-500 21-11-2012 20:12:00
                                ilm-500 21-11-2012 20:13:00
                                ilm-500 21-11-2012 20:14:00
                                ilm-500 21-11-2012 20:15:00
                                ilm-500 21-11-2012 20:16:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-500 21-11-2012 20:17:00
                                ilm-500 21-11-2012 20:18:00
                                ilm-500 21-11-2012 20:19:00
                                ilm-500 21-11-2012 20:20:00
                                ilm-500 21-11-2012 20:21:00
                                ilm-500 21-11-2012 20:22:00
                                ilm-500 21-11-2012 20:23:00
                                ilm-500 21-11-2012 20:24:00
                                ilm-500 21-11-2012 20:25:00
                                ilm-500 21-11-2012 20:26:00
                                ilm-500 21-11-2012 20:27:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-500 21-11-2012 20:28:00
                                ilm-500 21-11-2012 20:29:00
                                ilm-500 21-11-2012 20:30:00
                                ilm-500 21-11-2012 20:31:00
                                ilm-500 21-11-2012 20:32:00
                                ilm-500 21-11-2012 20:33:00
                                ilm-500 21-11-2012 20:34:00
                                ilm-500 21-11-2012 20:35:00
                                ilm-500 21-11-2012 20:36:00
                                ilm-500 21-11-2012 20:37:00
                                ilm-500 21-11-2012 20:38:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-500 21-11-2012 20:39:00
                                ilm-500 21-11-2012 20:40:00
                                ilm-500 21-11-2012 20:41:00
                                ilm-500 21-11-2012 20:42:00
                                ilm-500 21-11-2012 20:43:00
                                ilm-500 21-11-2012 20:44:00
                                ilm-500 21-11-2012 20:45:00
                                ilm-500 21-11-2012 20:46:00
                                ilm-500 21-11-2012 20:47:00
                                ilm-500 21-11-2012 20:48:00
                                ilm-500 21-11-2012 20:49:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-500 21-11-2012 20:50:00
                                ilm-500 21-11-2012 20:51:00
                                ilm-500 21-11-2012 20:52:00
                                ilm-500 21-11-2012 20:53:00
                                ilm-500 21-11-2012 20:54:00
                                ilm-500 21-11-2012 20:55:00
                                ilm-500 21-11-2012 20:56:00
                                ilm-500 21-11-2012 20:57:00
                                ilm-500 21-11-2012 20:58:00
                                ilm-500 21-11-2012 20:59:00
                                ilm-500 21-11-2012 21:00:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-251 21-11-2012 20:29:00
                                ilm-251 21-11-2012 20:30:00
                                ilm-251 21-11-2012 20:31:00
                                ilm-251 21-11-2012 20:32:00
                                ilm-251 21-11-2012 20:33:00
                                ilm-251 21-11-2012 20:34:00
                                ilm-251 21-11-2012 20:35:00
                                ilm-251 21-11-2012 20:36:00
                                ilm-251 21-11-2012 20:37:00
                                ilm-251 21-11-2012 20:38:00
                                ilm-251 21-11-2012 20:39:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-251 21-11-2012 20:40:00
                                ilm-251 21-11-2012 20:41:00
                                ilm-251 21-11-2012 20:42:00
                                ilm-251 21-11-2012 20:43:00
                                ilm-251 21-11-2012 20:44:00
                                ilm-251 21-11-2012 20:45:00
                                ilm-251 21-11-2012 20:46:00
                                ilm-251 21-11-2012 20:47:00
                                ilm-251 21-11-2012 20:48:00
                                ilm-251 21-11-2012 20:49:00
                                ilm-251 21-11-2012 20:50:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-251 21-11-2012 20:51:00
                                ilm-251 21-11-2012 20:52:00
                                ilm-251 21-11-2012 20:53:00
                                ilm-251 21-11-2012 20:54:00
                                ilm-251 21-11-2012 20:55:00
                                ilm-251 21-11-2012 20:56:00
                                ilm-251 21-11-2012 20:57:00
                                ilm-251 21-11-2012 20:58:00
                                ilm-251 21-11-2012 20:59:00
                                ilm-251 21-11-2012 21:00:00
                                ilm-425 21-11-2012 20:01:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-425 21-11-2012 20:02:00
                                ilm-425 21-11-2012 20:03:00
                                ilm-425 21-11-2012 20:04:00
                                ilm-425 21-11-2012 20:05:00
                                ilm-425 21-11-2012 20:06:00
                                ilm-425 21-11-2012 20:07:00
                                ilm-425 21-11-2012 20:08:00
                                ilm-425 21-11-2012 20:09:00
                                ilm-425 21-11-2012 20:10:00
                                ilm-425 21-11-2012 20:11:00
                                ilm-425 21-11-2012 20:12:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-425 21-11-2012 20:13:00
                                ilm-425 21-11-2012 20:14:00
                                ilm-425 21-11-2012 20:15:00
                                ilm-425 21-11-2012 20:16:00
                                ilm-425 21-11-2012 20:17:00
                                ilm-425 21-11-2012 20:18:00
                                ilm-425 21-11-2012 20:19:00
                                ilm-425 21-11-2012 20:20:00
                                ilm-425 21-11-2012 20:21:00
                                ilm-425 21-11-2012 20:22:00
                                ilm-425 21-11-2012 20:23:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-425 21-11-2012 20:24:00
                                ilm-425 21-11-2012 20:25:00
                                ilm-425 21-11-2012 20:26:00
                                ilm-425 21-11-2012 20:27:00
                                ilm-425 21-11-2012 20:28:00
                                ilm-425 21-11-2012 20:29:00
                                ilm-425 21-11-2012 20:30:00
                                ilm-425 21-11-2012 20:31:00
                                ilm-425 21-11-2012 20:32:00
                                ilm-425 21-11-2012 20:33:00
                                ilm-425 21-11-2012 20:34:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-425 21-11-2012 20:35:00
                                ilm-425 21-11-2012 20:36:00
                                ilm-425 21-11-2012 20:37:00
                                ilm-425 21-11-2012 20:38:00
                                ilm-425 21-11-2012 20:39:00
                                ilm-425 21-11-2012 20:40:00
                                ilm-425 21-11-2012 20:41:00
                                ilm-425 21-11-2012 20:42:00
                                ilm-425 21-11-2012 20:43:00
                                ilm-425 21-11-2012 20:44:00
                                ilm-425 21-11-2012 20:45:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-425 21-11-2012 20:46:00
                                ilm-425 21-11-2012 20:47:00
                                ilm-425 21-11-2012 20:48:00
                                ilm-425 21-11-2012 20:49:00
                                ilm-425 21-11-2012 20:50:00
                                ilm-425 21-11-2012 20:51:00
                                ilm-425 21-11-2012 20:52:00
                                ilm-425 21-11-2012 20:53:00
                                ilm-425 21-11-2012 20:54:00
                                ilm-425 21-11-2012 20:55:00
                                ilm-425 21-11-2012 20:56:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-425 21-11-2012 20:57:00
                                ilm-425 21-11-2012 20:58:00
                                ilm-425 21-11-2012 20:59:00
                                ilm-425 21-11-2012 21:00:00
                                ilm-428 21-11-2012 20:01:00
                                ilm-428 21-11-2012 20:02:00
                                ilm-428 21-11-2012 20:03:00
                                ilm-428 21-11-2012 20:04:00
                                ilm-428 21-11-2012 20:05:00
                                ilm-428 21-11-2012 20:06:00
                                ilm-428 21-11-2012 20:07:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-428 21-11-2012 20:08:00
                                ilm-428 21-11-2012 20:09:00
                                ilm-428 21-11-2012 20:10:00
                                ilm-428 21-11-2012 20:11:00
                                ilm-428 21-11-2012 20:12:00
                                ilm-428 21-11-2012 20:13:00
                                ilm-428 21-11-2012 20:14:00
                                ilm-428 21-11-2012 20:15:00
                                ilm-428 21-11-2012 20:16:00
                                ilm-428 21-11-2012 20:17:00
                                ilm-428 21-11-2012 20:18:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-428 21-11-2012 20:19:00
                                ilm-428 21-11-2012 20:20:00
                                ilm-428 21-11-2012 20:21:00
                                ilm-428 21-11-2012 20:22:00
                                ilm-428 21-11-2012 20:23:00
                                ilm-428 21-11-2012 20:24:00
                                ilm-428 21-11-2012 20:25:00
                                ilm-428 21-11-2012 20:26:00
                                ilm-428 21-11-2012 20:27:00
                                ilm-428 21-11-2012 20:28:00
                                ilm-428 21-11-2012 20:29:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-428 21-11-2012 20:30:00
                                ilm-428 21-11-2012 20:31:00
                                ilm-428 21-11-2012 20:32:00
                                ilm-428 21-11-2012 20:33:00
                                ilm-428 21-11-2012 20:34:00
                                ilm-428 21-11-2012 20:35:00
                                ilm-428 21-11-2012 20:36:00
                                ilm-428 21-11-2012 20:37:00
                                ilm-428 21-11-2012 20:38:00
                                ilm-428 21-11-2012 20:39:00
                                ilm-428 21-11-2012 20:40:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-428 21-11-2012 20:41:00
                                ilm-428 21-11-2012 20:42:00
                                ilm-428 21-11-2012 20:43:00
                                ilm-428 21-11-2012 20:44:00
                                ilm-428 21-11-2012 20:45:00
                                ilm-428 21-11-2012 20:46:00
                                ilm-428 21-11-2012 20:47:00
                                ilm-428 21-11-2012 20:48:00
                                ilm-428 21-11-2012 20:49:00
                                ilm-428 21-11-2012 20:50:00
                                ilm-428 21-11-2012 20:51:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-428 21-11-2012 20:52:00
                                ilm-428 21-11-2012 20:53:00
                                ilm-428 21-11-2012 20:54:00
                                ilm-428 21-11-2012 20:55:00
                                ilm-428 21-11-2012 20:56:00
                                ilm-428 21-11-2012 20:57:00
                                ilm-428 21-11-2012 20:58:00
                                ilm-428 21-11-2012 20:59:00
                                ilm-428 21-11-2012 21:00:00
                                ilm-495 21-11-2012 20:01:00
                                ilm-495 21-11-2012 20:02:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:03:00
                                ilm-495 21-11-2012 20:04:00
                                ilm-495 21-11-2012 20:05:00
                                ilm-495 21-11-2012 20:06:00
                                ilm-495 21-11-2012 20:07:00
                                ilm-495 21-11-2012 20:08:00
                                ilm-495 21-11-2012 20:09:00
                                ilm-495 21-11-2012 20:10:00
                                ilm-495 21-11-2012 20:11:00
                                ilm-495 21-11-2012 20:12:00
                                ilm-495 21-11-2012 20:13:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:14:00
                                ilm-495 21-11-2012 20:15:00
                                ilm-495 21-11-2012 20:16:00
                                ilm-495 21-11-2012 20:17:00
                                ilm-495 21-11-2012 20:18:00
                                ilm-495 21-11-2012 20:19:00
                                ilm-495 21-11-2012 20:20:00
                                ilm-495 21-11-2012 20:21:00
                                ilm-495 21-11-2012 20:22:00
                                ilm-495 21-11-2012 20:23:00
                                ilm-495 21-11-2012 20:24:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:25:00
                                ilm-495 21-11-2012 20:26:00
                                ilm-495 21-11-2012 20:27:00
                                ilm-495 21-11-2012 20:28:00
                                ilm-495 21-11-2012 20:29:00
                                ilm-495 21-11-2012 20:30:00
                                ilm-495 21-11-2012 20:31:00
                                ilm-495 21-11-2012 20:32:00
                                ilm-495 21-11-2012 20:33:00
                                ilm-495 21-11-2012 20:34:00
                                ilm-495 21-11-2012 20:35:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:36:00
                                ilm-495 21-11-2012 20:37:00
                                ilm-495 21-11-2012 20:38:00
                                ilm-495 21-11-2012 20:39:00
                                ilm-495 21-11-2012 20:40:00
                                ilm-495 21-11-2012 20:41:00
                                ilm-495 21-11-2012 20:42:00
                                ilm-495 21-11-2012 20:43:00
                                ilm-495 21-11-2012 20:44:00
                                ilm-495 21-11-2012 20:45:00
                                ilm-495 21-11-2012 20:46:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:47:00
                                ilm-495 21-11-2012 20:48:00
                                ilm-495 21-11-2012 20:49:00
                                ilm-495 21-11-2012 20:50:00
                                ilm-495 21-11-2012 20:51:00
                                ilm-495 21-11-2012 20:52:00
                                ilm-495 21-11-2012 20:53:00
                                ilm-495 21-11-2012 20:54:00
                                ilm-495 21-11-2012 20:55:00
                                ilm-495 21-11-2012 20:56:00
                                ilm-495 21-11-2012 20:57:00

                                HOST_NAME TO_CHAR(SYSTEMDATE,
                                -------------------------------------------------- -------------------
                                ilm-495 21-11-2012 20:58:00
                                ilm-495 21-11-2012 20:59:00
                                ilm-495 21-11-2012 21:00:00


                                1620 rows selected.


                                Thanks
                                • 13. Re: Find the data based on week-end ,week-day
                                  Marcus Rangel
                                  Well, there it is: you do not have a 'ilm-25' host name, that is why your previous queries were not bringing any rows. I have to go home now, but I think you already have all the tools to solve your problem. If you agree, please mark the thread as "answered" (and any answers as helpful or correct, if it is the case).
                                  • 14. Re: Find the data based on week-end ,week-day
                                    925887
                                    Hi,

                                    Thanks for your support.


                                    Thanks