sql query....

Results 1 to 2 of 2

Thread: sql query....

  1. #1
    orix Guest

    Default sql query....

    Hey!<BR>Is there sql query that, for example, will take the Book IDs from one table, ONLY if they don&#039t appear in another table?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: sql query....

    Assume you have two Tables:<BR><BR>Books with fields<BR> Bookid <BR> Title<BR>Subjects with fields<BR> Subjects<BR> Bookid<BR><BR>The Following query will select Books with no matching subjects<BR><BR>SELECT DISTINCTROW Books.BookId<BR>FROM Books <BR>LEFT JOIN Subjects ON Books.BookId = Subjects.BookId<BR>WHERE (((Subjects.BookId) Is Null))<BR><BR>The above example is for an Access database, SQL Database may be different.<BR><BR>RobinR<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts