SQL: Create a SQL query that uses a correlated subquery to display the descriptions for products provided by a vendor in area code 904. The outer query will use the PRODUCT table, then use WHERE EXISTS, then the subquery which will use the VENDOR and PRODUCT tables via a join (a join should be used here). [hint: you should have 3 records of output].  My code: select p_descript from product where exist(select v_areacode from vendor where v_areacode = '904') ; I am getting an error but I can't see what is missing. ORA-00936: missing expression

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter7: Developing An Excel Application
Section: Chapter Questions
Problem 3RA
icon
Related questions
icon
Concept explainers
Question

SQL:

Create a SQL query that uses a correlated subquery to display the descriptions for products provided by a vendor in area code 904. The outer query will use the PRODUCT table, then use WHERE EXISTS, then the subquery which will use the VENDOR and PRODUCT tables via a join (a join should be used here). [hint: you should have 3 records of output]. 

My code:

select p_descript from product where exist(select v_areacode from vendor where v_areacode = '904') ;

I am getting an error but I can't see what is missing.

ORA-00936: missing expression

CUSTOMER
aus CODE
CUS LNAME
CUS FNAME
CUS INITIAL
CUS AREACODE
CUS PHONE
CUS BALANCE
PRODUCT
PODE.
DESCRI PT
INDATE
PCOH
P MIN
P PRICE
P DISOOUNT
V_CODE
VENDOR
V CODE
V NAME
V CONTACT
V_AREACODE
V PHONE
V STATE
V ORDER
INVOICE
INV NUMBER
CUS CODE
INV DATE
UNE
INV NIMBER
TINE NUMBER
P OODE
INE UNITS
LINE PRICE
EMPLOYEE
00
EMP NUM
BMP TITLE
EMP LNAME
BMP ANAME
BMP_INITIAL
EMP DOB
BMP HI RE DATE
BMP AREACODE
EMP PHONE
1 BMP_MGR
G瓦图
164%
Transcribed Image Text:CUSTOMER aus CODE CUS LNAME CUS FNAME CUS INITIAL CUS AREACODE CUS PHONE CUS BALANCE PRODUCT PODE. DESCRI PT INDATE PCOH P MIN P PRICE P DISOOUNT V_CODE VENDOR V CODE V NAME V CONTACT V_AREACODE V PHONE V STATE V ORDER INVOICE INV NUMBER CUS CODE INV DATE UNE INV NIMBER TINE NUMBER P OODE INE UNITS LINE PRICE EMPLOYEE 00 EMP NUM BMP TITLE EMP LNAME BMP ANAME BMP_INITIAL EMP DOB BMP HI RE DATE BMP AREACODE EMP PHONE 1 BMP_MGR G瓦图 164%
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
A+ Guide To It Technical Support
A+ Guide To It Technical Support
Computer Science
ISBN:
9780357108291
Author:
ANDREWS, Jean.
Publisher:
Cengage,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning