That's an outer join I think you are looking for isn't it?

...not 100% on the sql for that, need data to play with :)


On 12/19/05, LeanBackVids.com <[EMAIL PROTECTED]> wrote:
Yes, but I've already got the distint states...
http://www.vlogmap.org/states.php

I'm trying to get the states that are NOT in the vlogs table.

-Matt


--- In [email protected], "taoofdavid65" <[EMAIL PROTECTED]>
wrote:
>
> You could try something along the lines of...
>
> SELECT DISTINCT column_name(s)
> FROM table_name
>
> or
>
> SELECT DISTINCT states FROM ...
>
> Not sure if the NULL will work in this case?
>
> --- In [email protected], "LeanBackVids.com"
> <[EMAIL PROTECTED]> wrote:
> >
> > Need an example to understand how you're suggesting the use NULL or
> > DISTINCT.  I've tried using a subquery, but it returns more than 1
> > result and that is not supported with MySQL.
> >
> > Here is the subquery idea...
> >
> > SELECT * FROM states WHERE id != (SELECT stateid FROM vlogs GROUP BY
> > stateid)
> >
> > -Matt
> > -----------------------
> > http://ridertech.com
> > http://leanbackvids.com
> > http://vlogmap.org
> >
> >
> > --- In [email protected], "taoofdavid65" <[EMAIL PROTECTED]>
> > wrote:
> > >
> > > or...select "DISTINCT"?
> > >
> > >
> > >
> > > David
> > > http://www.taoofdavid.com
> > >
> > > --- In [email protected], "LeanBackVids.com"
> > > <[EMAIL PROTECTED]> wrote:
> > > >
> > > > As a supplement to the "Countries of Vlogging" , I've added the
> > > > "States of Vlogging", a breakdown of the North American states and
> > > > provinces.
> > > >
> > > > http://www.vlogmap.org/countries.php
> > > > http://www.vlogmap.org/states.php
> > > >
> > > > It has been a long day and my brain is weak... Any SQL gurus out
> > > > there?  I'd like to select all the state_ids from the states table
> > > > that DO NOT appear in the vlog table. The following statement
> does not
> > > > work, but gives an example of what I'm trying to do...
> > > >
> > > > SELECT states.* FROM states, vlogs WHERE states.state_id !=
> > > vlogs.state_id
> > > >
> > > > That last variable needs to represent all the unique state_ids
from
> > > > the vlogs table.  I'm getting syntax errors all over the place.
> > > >
> > > > It would be cool to list those lonely regions in the
vlogosphere.  I
> > > > could do the same with countries, but it involves much more data.
> > > > Baby steps.
> > > >
> > > > Hit me back if you can help...
> > > > vlogmap at gmail dot com
> > > >
> > > > -Matt
> > > > -----------------------
> > > > http://ridertech.com
> > > > http://leanbackvids.com
> > > > http://vlogmap.org
> > > >
> > >
> >
>







SPONSORED LINKS
Individual Fireant Typepad
Use


YAHOO! GROUPS LINKS






--
~Devlon
Blog: http://devlond.blogspot.com/
Vlog: http://8bitme.blogspot.com

http://mefeedia.com/ -OR- http://mefeedia.com/blog/

SPONSORED LINKS
Individual Fireant Typepad
Use


YAHOO! GROUPS LINKS




Reply via email to