question

stevensonbd2006 avatar image
stevensonbd2006 asked

Receiving Error When Creating JOINS in Oracle

I am new to using Oracle SQL Developer database, I am trying to execute the following syntax below and keep getting an error message. I get results when asking for one website_desc but error appears when attempting to ask for both website_desc. Any suggestions on how to correct this issue? This is what I am attempting: Using a join, provide the employee name, website address and blog address for the following websites; Jim’s New Site and Garyworld. SELECT e.First_Name,e.Last_Name,w.Website_URL,b.Blog_URL FROM Employee e INNER JOIN Website w ON e.employee_id = w.employee_id INNER JOIN Blog b ON w.blog_id = b.blog_id WHERE w.website_desc = 'Jims new site','Garyworld!' ORDER BY e.last_name; Error message: Error starting at line 1 in command: SELECT e.First_Name,e.Last_Name,w.Website_URL,b.Blog_URL FROM Employee e INNER JOIN Website w ON e.employee_id = w.employee_id INNER JOIN Blog b ON w.blog_id = b.blog_id WHERE w.website_desc = 'Jims new site','Garyworld!' ORDER BY e.last_name Error at Command Line:5 Column:39 Error report: SQL Error: ORA-00933: SQL command not properly ended 00933. 00000 - "SQL command not properly ended" *Cause: *Action:
oraclejoinsplsql
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gazz avatar image
Gazz answered
I think the WHERE part is causing you errors: WHERE w.website_desc = 'Jims new site','Garyworld!' What do you ant the website description to be? w.website_desc = 'Jims new site' OR w.website_desc = 'Garyworld!'
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

stevensonbd2006 avatar image stevensonbd2006 commented ·
Thank you. Your suggestion fixed the issue.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.