Thanks Devlon for the spark... SELECT states.* FROM states LEFT JOIN vlogs ON states.id = vlogs.stateid WHERE vlogs.stateid IS NULL
It will be added to the bottom of the states page in a matter of momenets. Thanks again. -Matt --- In [email protected], Devlon <[EMAIL PROTECTED]> wrote: > > 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<http://groups.yahoo.com/gads?t=ms&k=Individual&w1=Individual&w2=Fireant&w3=Typepad&w4=Use&c=4&s=51&.sig=IkmOF87iVVg5aOV5s-5ShQ> > > Fireant<http://groups.yahoo.com/gads?t=ms&k=Fireant&w1=Individual&w2=Fireant&w3=Typepad&w4=Use&c=4&s=51&.sig=H15DYYUHQoulfARYZSKttA> > > Typepad<http://groups.yahoo.com/gads?t=ms&k=Typepad&w1=Individual&w2=Fireant&w3=Typepad&w4=Use&c=4&s=51&.sig=bK2vbSrJUIzcRadddW7krQ> > > Use<http://groups.yahoo.com/gads?t=ms&k=Use&w1=Individual&w2=Fireant&w3=Typepad&w4=Use&c=4&s=51&.sig=RO46LszR1YSPWsK2mib1pA> > > ------------------------------ > > YAHOO! GROUPS LINKS > > > > > > - Visit your group "videoblogging<http://groups.yahoo.com/group/videoblogging>" > > on the web. > > > > - To unsubscribe from this group, send an email to: > > [EMAIL PROTECTED]<[EMAIL PROTECTED]> > > > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of > > Service <http://docs.yahoo.com/info/terms/>. > > > > > > ------------------------------ > > > > > > -- > ~Devlon > Blog: http://devlond.blogspot.com/ > Vlog: http://8bitme.blogspot.com > > http://mefeedia.com/ -OR- http://mefeedia.com/blog/ > ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income homes are not online. Make a difference this holiday season! http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/lBLqlB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/videoblogging/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
