question

stevensonbd2006 avatar image
stevensonbd2006 asked

Oracle Script Results Return "No Rows Selected"

I am trying to provide employee first name, last name, and branch name for employees that do NOT have a blog site, but my script output always return "no rows selected". Any suggestions on what is causes this issue? Syntax: SELECT e.first_name,e.last_name,b.branch_name FROM Employee e INNER JOIN Branch b ON e.branch_id = b.branch_id INNER JOIN Website w ON e.employee_id = w.employee_id INNER JOIN Blog bl ON w.blog_id = bl.blog_id WHERE bl.blog_URL = NULL
oraclejoins
10 |1200 characters needed characters left characters exceeded

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

1 Answer

· Write an Answer
Gazz avatar image
Gazz answered
Start with the basic part of the query and add to it: How many rows does this return: SELECT * FROM Employee How many rows does this return SELECT * FROM Employee e INNER JOIN Branch b ON e.branch_id = b.branch_id
3 comments
10 |1200 characters needed characters left characters exceeded

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

oh I see - WHERE bl.blog_URL = NULL is your problem. You want WHERE bl.blog_URL IS NULL
1 Like 1 ·
That way was much easier and it returned 16 rows but the main issue is the Where not clause. I am now receiving an error message. New syntax: SELECT * FROM Employee e INNER JOIN Branch b ON e.branch_id = b.branch_id INNER JOIN Website w ON e.employee_id = w.employee_id INNER JOIN Blog bl ON w.blog_id = bl.blog_id WHERE bl.blog_url NOT
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.