Alpha Video Training
Results 1 to 3 of 3

Thread: Tables With Two IDs

  1. #1
    George Smyth
    Guest

    Default Tables With Two IDs

    I have uploaded my database in the hopes that someone might have an idea as to what is going on.

    In Report #7 Bill (Indv ID=1) and Jane (Indv ID=3) have taken classes. The class they first took (Class ID=0) they both rented boats. Looking at the Rental table Bill rented a Long Boat (Boat ID=0) and Jane rented a Short Boat (Boat ID=1). In the report it shows Jane as having rented a Long Boat. The second class they took (Class ID=1) Bill rented a Medium Boat and Jane did not rent a boat. The report shows Bill as having rented a Medium Boat.

    I am guessing that since the Rental table is looking at the Indv ID and Class ID that it is not able to display the information properly. Perhaps I need to link the table to both the Indv and Class tables, but I do not know how to do this (or if this is the problem). I tried linking the Rental table to the Indv table but that did not help.

    Cheers -

    george

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Tables With Two IDs

    You can link two tables on an "expression". This is the top choice when building a set but it is not often visible because Alpha will suggest the first field it finds in common to both tables.

    Edit your set, use the edit link button, in the "Parent Key" field click on the triangle button at the right. Define the link as "expression" and the expression builder will appear. Choose field name and select a field, type a plus sign, select another field name. Do the same for the child table.

    This creates a link on multiple fields.

    That said I think your problem is more conceptual than linkage. You have a dependency in your set structure that doesn't follow your real life situation. You have boat linked to rental linked to class. A class does not rent a boat. If you move the rental-boat link up to the indv_class level (on screen as inv_class-rental-boat), I believe you will be able to enerate the report you want.

  3. #3
    George Smyth
    Guest

    Default RE: Tables With Two IDs

    Stan -

    I do not have it working yet, but I see what you are saying as far as relating them through an expression. I will work in that direction.

    I think that I see what you mean concerning linking the rental to the indv_class table and will give that a try. It makes sense but I also need to get it to sink in.

    I appreciate the help.

    Cheers -

    george

Similar Threads

  1. No of tables
    By Robin Smith in forum Alpha Five Version 5
    Replies: 4
    Last Post: 04-21-2005, 05:22 PM
  2. appending tables
    By Bob Burnside in forum Alpha Five Version 5
    Replies: 1
    Last Post: 07-12-2004, 12:28 PM
  3. More Tables or Less?
    By Daryl Strickland in forum Alpha Five Version 5
    Replies: 4
    Last Post: 01-05-2004, 08:17 PM
  4. Many tables into one
    By MIKE LYON in forum Alpha Five Version 4
    Replies: 5
    Last Post: 06-24-2002, 05:10 PM
  5. How many tables can you put in in adb?
    By DaveM in forum Alpha Five Version 4
    Replies: 5
    Last Post: 10-11-2001, 05:51 PM

Bookmarks

Posting Permissions

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