#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 1999
    Location
    stockholm, jarfalla, sweden
    Posts
    2
    Rep Power
    0
    I can read in the manual that these nested queries cannot be made. However there is no example on how to solve my problem w/o nesting:

    select * from product where prodId not in (select catProdId from categoryMember)

    What I want, obviously, is to show all products not being member of any category.

    Thnx for any tips,
    /erik
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Annapolis, Maryland US
    Posts
    113
    Rep Power
    15
    It is possible to rewrite this subselect as a left join....

    select product.*
    from product LEFT JOIN categoryMember
    ON product.prodID=categoryMember.catProdID
    WHERE categoryMember.catProdID IS NULL;

Similar Threads

  1. Update next select box to current select box value plus one
    By Sepodati in forum HTML Programming
    Replies: 4
    Last Post: April 21st, 2003, 09:07 PM
  2. Help Needed in writing query without nested select
    By flanagaj in forum MySQL Help
    Replies: 0
    Last Post: April 2nd, 2003, 01:55 PM
  3. Dynamic value of select box based on other select box
    By etherwolf in forum HTML Programming
    Replies: 6
    Last Post: October 16th, 2001, 10:11 AM
  4. PHP/Mysql select from 2 tables.
    By Hagan.B in forum PHP Development
    Replies: 5
    Last Post: October 15th, 2001, 07:49 AM
  5. select box changes other select box...
    By etherwolf in forum PHP Development
    Replies: 6
    Last Post: October 11th, 2001, 11:29 AM

IMN logo majestic logo threadwatch logo seochat tools logo