SQL query problem...

Results 1 to 2 of 2

Thread: SQL query problem...

  1. #1
    Join Date
    Dec 1969

    Default SQL query problem...

    Hi, <BR><BR>I have a little problem and I can&#039;t figure out how to solve it. <BR>I have a table with categories and I have another table - News - with entries for each categories. <BR>The relationship between them is "one to many" type (starting from "IDCategory" from Category table to "NewsCategory" from <BR>News table).The boxes "Enforce referential integrity", "Cascade update related fields", "Cascade delete related records" are <BR>checked. <BR>What I want to do? <BR><BR>I want, on a single page, to be displayed the category names and the entries for each category (will be only 3 records in each <BR>category).For example: <BR><BR>Category 1 <BR> Record 1 <BR> Record 2 <BR> Record 3 <BR>Category 2 <BR> Record 1 <BR> Record 2 <BR> Record 3 <BR>.......and so on <BR><BR>How can I do this with only one SQL query? <BR>I tried something with INNER JOIN but Jet engine tells me that the Join operation is not supported. <BR><BR>Any advices? <BR><BR>Thanks, <BR>Mircea

  2. #2
    Join Date
    Dec 1969

    Default Does this work??

    select a.categoryname, a.category_id,b.record1,b.record2... from category a, news b where a.category_id=b.category_id

Posting Permissions

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