5 Replies Latest reply: Dec 30, 2012 1:49 PM by stefan nebesnak RSS

    log

    948062
      Requirement:
      R_ID_EVENT4   MISSING ANNUAL EVENTS        If current date is July 31, query TIS_EVENT focus on records where ANNUAL_EVENT_FLG = ‘Y’. Identify records that have not been                                                             associated to any date but dates are available in TIS_DT table for next year. Use TIS_EVENT_DT_RLTSHP to derive this list. 
                                                                          Report on the EVENT_ID, EVENT_DESC and Year that the Event has not been tagged for. 
      Output like:
      R_ID_EVENT4 MISSING ANNUAL EVENTS EVENT_ID: 123 - EVENT_DESC: AFL Grand Final Day - Year: 2013
        • 1. Re: log
          AlbertoFaenza
          Hi,

          welcome to the forum.

          Please read SQL and PL/SQL FAQ

          How do you pretend to get an answer with such questions?
          Where is your table structure?
          Where is your sample data?

          Regards.
          Al
          • 2. Re: log
            L-MachineGun
            Also, be aware we DO NOT do the homework for you but rather may help you if you get "stuck".
            You need to work it out yourself and post the results.
            :p
            • 3. Re: log
              sb92075
              Handle:     945059
              Status Level:     Newbie
              Registered:     Jul 8, 2012
              Total Posts:     213
              Total Questions:     42 (34 unresolved)

              why do you waste time here when most of your questions remain unanswered?
              • 4. Re: log
                APC
                The one thing more annoying than people who post code without using the {noformat}
                {noformat} tag to make it readable and those people who use {noformat}
                {noformat} tags to render ordinary text unreadable.

                You have posted more than two hundred times. That really ought to be sufficient both to understand how to use the forum software properly and to grasp the etiquette of asking your questions in an appropriate way.

                So please edit your question and fix the formatting.

                Your future co-operation is appreciated.

                Cheers, APC
                • 5. Re: log
                  stefan nebesnak
                  Could you post the schema of these tables?
                  SQL*Plus command:
                   
                  SQL> DESC TIS_EVENT
                  SQL> DESC TIS_DT
                  SQL> DESC TIS_EVENT_DT_RLTSHP
                  Your requirement is very unclear, it's difficult to suggest the correct way, check the following example:
                  SELECT t.r_id_event4, 
                         t.event_id, 
                         t2.event_desc, 
                         To_char(t3.DATE, 'YYYY') AS Year 
                  FROM   tis_event_dt_rltshp t --EVENT DATE RELATIONSHIP 
                         join tis_event t2 USING (event_id) --EVENT 
                         join tis_dt t3 USING (event_id) --DATE 
                  WHERE  t2.annual_event_flg = 'Y' 
                         AND To_char(t3.DATE, 'YYYY') = '2013';