troubles with 2 tables

Results 1 to 2 of 2

Thread: troubles with 2 tables

  1. #1
    Mark Guest

    Default troubles with 2 tables

    I have 2 tables, one is called products, the other categories.<BR>I need to get the category from categories and other details from products where the price is under $450 (price is in products). I am using this but am getting errors:<BR> sql = "select ProductID, ProductName, Description, price from Products, category from categories where price &#062;= 450 and categories.categoryid = products.categoryid"<BR>the categoryid is listed in both tables. It says i have an error with my FROM clause. Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default RE: troubles with 2 tables

    you should be using a JOIN statement here. fire up an SQL manual or wander over to and look for the article on INNER JOINS<BR><BR>j

Posting Permissions

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