calling values from two tables

Results 1 to 2 of 2

Thread: calling values from two tables

  1. #1
    Join Date
    Dec 1969

    Default calling values from two tables

    I have an ASP page that contains a list of "stores" and "prices". What i need to do is: for each store name that is listed on the page I would like to gather more information about that store in another table. It is listed in another table so I don&#039;t need to reapeat the data for each record. Does anyone know how to do this?<BR><BR>-Adrian

  2. #2
    Join Date
    Dec 1969

    Default RE: calling values from two tables

    IT depends on how your database is set up...<BR><BR>Store_table (Place)<BR>-----------<BR>Store_id (counter or autonumber) -- The keyfield<BR>Store_name<BR>Store_Phone<BR>Store_add ress<BR>blah blah (basic information about the store)<BR><BR>Products_table (Things)<BR>--------------<BR>product_id (Primary key for a product or thing that a store has)<BR>Store_ID (Foreign key to the store)<BR>PRoduct_Name<BR>Product_Price<BR>blah blah (other information about the product.)<BR><BR>You can then use a SQL command like this...<BR><BR>Select products_table.* from products_table where store_id = " & storeID<BR><BR>This will grab all the store information for your specified store id.<BR><BR>There are other ways of doing this, this is, IMHO the quick and dirty way to do it.<BR>-- Whol<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