This the problem in my book that I am trying to solve..I need to create this report..
A list of the programs on all channels for a specific day showing the channel number, supplier, package, program name, rating code, and show time. This will be similar to a program guide, only not package specific. This is a date-driven report, therefore it should only display programs for a single date specified.
I tried this so far..
CREATE VIEW PROG_LINEUP AS
SELECT DISTINCT
PC.PROGTIME AS `SHOWTIME`,
P.PROGNAME AS `PROGRAM TITLE`,
C.CHID AS `CHANNEL #`,
SU.SUPNAME AS `SUPPLIER`,
R.RATING AS `RATING`
FROM
PROG_CHAN PC,
CHANNELS C,
SUPPLIERS SU,
PROGRAM P,
CHANNEL_PACKAGE CP,
RATING R
WHERE
PC.SHOWDATE = '18-DEC-10'
AND P.PROGID = PC.PROGID
AND CP.CHID = PC.CHID
AND R.RATINGID = P.RATINGID
AND C.CHID = PC.CHID
AND SU.SUPID = P.SUPID
ORDER BY PC.CHID;
But it’s giving this error when the table Prog_chan exists! I checked.. What is wrong?
Please tell me if any table script is required. Please help…
WHERE PC.SHOWDATE = '18-DEC-10' AND
*
ERROR at line 13:
ORA-00903: invalid table name
I cant figure out what is wrong since Prog_chan table exists and has values too in it..
QL> desc prog_chan;
Name Null? Type
----------------------------------------- -------- ----------------------------
CHANID NOT NULL NUMBER(5)
PROGID NOT NULL NUMBER(5)
SHOWDATE NOT NULL DATE
STARTTIME NOT NULL DATE
@Jeff –
I removed that comma but error is this now…
CHANNEL_PACKAGE CP, * ERROR at line 11: ORA-00942: table or view does not exist
You have an erroneous extra comma before the WHERE clause.