Thread: Joining tables

  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Rep Power
    I want to join can1 and can2 and have tried everything. Is there anyone that can help.

    Thanks in advance.
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Caro, Michigan
    Rep Power
    SELECT as one, can1.fraganr as fraganr FROM can1,can2 ORDER BY can ASC;

    There's no real relation between the tables, though, so any join can give you different results each time.

    ---John Holmes...

    * The manual can probably answer 90% of your questions...
    * PHP Manual.
    * MySQL Manual:

    [This message has been edited by SepodatiCreations (edited November 28, 2000).]
  4. #3
  5. Wiking
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Sep 2000
    Rep Power
    Since the tables can1 and can2 have nothing in common but the column names, there's no way of doing that. Add a column in each table that 'categorizes' the rows, so that they have something in common, and you'll be there.
    An alternative is to use a temporary table with an xtra column for the grouping values, then first select into that table from can1 & can2, then update the temporary table and set the xtra column to some category value based on for example the value of column one.
    It not very efficient, but it could work...


Similar Threads

  1. Joining two tables
    By toniri4 in forum Visual Basic Programming
    Replies: 2
    Last Post: November 22nd, 2003, 11:42 PM
  2. joining tables to get each username to each entry
    By syndrome in forum MySQL Help
    Replies: 11
    Last Post: September 1st, 2003, 01:03 PM
  3. Joining indirectly related tables
    By fmhoyt in forum MySQL Help
    Replies: 1
    Last Post: August 16th, 2003, 09:42 AM
  4. Joining multiple tables without a 1-to-1 match
    By unixman in forum MySQL Help
    Replies: 2
    Last Post: August 16th, 2003, 09:39 AM
  5. joining tables
    By tamara in forum MySQL Help
    Replies: 2
    Last Post: July 31st, 2003, 07:30 PM

IMN logo majestic logo threadwatch logo seochat tools logo