Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

log

948062Dec 28 2012 — edited Dec 30 2012
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

Comments

AlbertoFaenza
Hi,

welcome to the forum.

Please read 2176552

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

Regards.
Al
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
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?
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
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'; 
1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 27 2013
Added on Dec 28 2012
5 comments
122 views