Posted by Andy Hassall on 11/11/96 11:17
On 29 May 2005 00:26:09 -0700, "pauld" <pdc124@yahoo.co.uk> wrote:
>New at this :-)
>
>2 tables
>demographic visits
>---------------- ------------------
>custID | name | |custID | other stuff |
>---------------- ----------------------
>
>I want all those names where the custID doesnt appear in vists
>
>select name FROM demographic WHERE NOT EXISTS (SELECT custID FROM
>visits WHERE demographic.custID=visits.custID);
>
>is a syntax error
Not in most databases. Which one are you using? What's the actual error
message?
There are various ways of rewriting the query to produce the same result
(there's nothing wrong with your syntax on most databases though) - but it
depends which one you're using.
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Navigation:
[Reply to this message]
|