Hello,
I was wondering if anyone would be able to help me with a problem I'm
having. I'm trying to use the following query:
SELECT Distinct c.site_id
FROM campsite c
WHERE c.site_id NOT IN (SELECT cs.site_id
FROM campsite_status cs
WHERE c.site_id = cs.site_id
AND cs.status_date = '2004-06-22')
Basically I'm trying to get a listing of the campsites that are not in
use on the specified day. But I'm getting the following error from
MySQL Command Center.
[root@localhost: 3306] ERROR 1064: You have an error in your SQL
syntax. Check the manual that corresponds to your MySQL server
version for the right syntax to use near 'SELECT cs.site_id
FROM campsite_statu
Anyone know why? I'd really appreciate the help, I can seem to get
any subqueries to work.
Thanks,
Dan
I was wondering if anyone would be able to help me with a problem I'm
having. I'm trying to use the following query:
SELECT Distinct c.site_id
FROM campsite c
WHERE c.site_id NOT IN (SELECT cs.site_id
FROM campsite_status cs
WHERE c.site_id = cs.site_id
AND cs.status_date = '2004-06-22')
Basically I'm trying to get a listing of the campsites that are not in
use on the specified day. But I'm getting the following error from
MySQL Command Center.
[root@localhost: 3306] ERROR 1064: You have an error in your SQL
syntax. Check the manual that corresponds to your MySQL server
version for the right syntax to use near 'SELECT cs.site_id
FROM campsite_statu
Anyone know why? I'd really appreciate the help, I can seem to get
any subqueries to work.
Thanks,
Dan
Comment