Hawkeye-X
(1000+ posts)
Send PM |
Profile |
Ignore
|
Tue Nov-11-03 03:20 PM
Original message |
Oracle gurus (Specifically CREATE VIEW gods) |
|
What am I doing wrong?
CREATE VIEW PAPERBACK AS SELECT BOOK_CODE, TITLE, PUBLISHER_NAME, PRICE FROM BOOK, PUBLISHER WHERE PAPERBACK = ‘Y’ AND PUBLISHER.PUBLISHER_CODE = PUBLISHER.PUBLISHER_CODE;
It tells me that I'm missing an expression on line 3
I'm supposed to call everything with ALL paperback and the publisher name is on a different table (PUBLISHER) instead of the book table. The book table has a foreign key (PUBLISHER_CODE) to help reference the PUBLISHER table.
Hawkeye-X
|
jono
(1000+ posts)
Send PM |
Profile |
Ignore
|
Tue Nov-11-03 03:24 PM
Response to Original message |
|
Both your tables are aliased PUBLISHER in your join statement:
PUBLISHER.PUBLISHER_CODE = PUBLISHER.PUBLISHER_CODE
I assume it should read:
BOOK.PUBLISHER_CODE = PUBLISHER.PUBLISHER_CODE
:hi:
|
WhoCountsTheVotes
(1000+ posts)
Send PM |
Profile |
Ignore
|
Tue Nov-11-03 03:39 PM
Response to Original message |
|
PUBLISHER.PUBLISHER_CODE = PUBLISHER.PUBLISHER_CODE
should be
PUBLISHER.PUBLISHER_CODE = BOOK.PUBLISHER_CODE
probably :)
|
DU
AdBot (1000+ posts) |
Fri Apr 19th 2024, 01:39 AM
Response to Original message |