Jump to content

john_grimsby

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Posts posted by john_grimsby

  1. Hello

    I am trying to build a reggae 7" single discography database, with three tables

    RECORD LABEL ([u]record_label_ref[/u], record_label, country, subsidiary_of, label_info)
    ARTIST ([u]artist_ref[/u], artist_name, artist_info)
    RECORD ([u]record_ref[/u], cat_no, [i]record_label_ref[/i], label_display, [i]artist_ref_a[/i], song_a, [i]artist_ref_b[/i], song_b, year)

    As you can see, each record has two artists, one on each side. I want a query which displays the information for each record like so (I've omitted a few columns for simplicty):

    PAMA 1 (A) ARTIST A Song A c/w (2) ARTIST B Song B (1960)

    So far I have got the query:

    SELECT record_label.record_label, record.cat_no, label_display, artist_ref_a, artist.artist_name, song_a, composer_a, producer_a, arranger_a, artist_ref_b, artist.artist_name, song_b, composer_b, producer_b, arranger_b, year, est_value, rarity_rating, rec_info
    FROM record, record_label, artist
    WHERE record.record_label_ref = $record_label_ref
    AND record.artist_ref_a = artist.artist_ref
    AND record.artist_ref_b = artist.artist_ref
    AND record.record_label_ref = record_label.record_label_ref;

    However, this query will only display records where artist_ref_a is the same as artist_ref_b.

    CAN ANYONE PLEASE HELP - IT'S DRIVNG ME CRAZY!!!!


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.