You are here: Re: NOT EXISTS syntax problem « PHP Programming Language « IT news, forums, messages
Re: NOT EXISTS syntax problem

Posted by Andy Hassall on 11/05/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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация