We have created 2 tables

- Artist
> ArtistID
> Name

- Album
> AlbumName
> ArtistID

We created a join between Album.ArtistID and Artist.ArtistID

Now we would like to build a view of all albums with the columns Artist.Name & AlbumName.

Is that possible? And if so, how?

Comments

alex_b’s picture

One of those two tables - artist or album needs to be a Views base table, this means it needs to have a primary key (that's how Views is designed). For this example's sake, let's assume it's "Artist".

Now go to the album data table configuration and add a 'join' from Album.ArtistID to Artist.ArtistID (not the other way round).

Then create a View of type "Artist" and add a relationship to Album. Now all Album properties should be available in your Artist view.

seethav’s picture

I have doubt in how to join two tables

I have two table with following format

user_enrty table
-----------
username --->Primary Key
firstname
location
dob

Login_entry table
--------------
username
date

I want to display location of user in Login Report page?
report field should like this--------->(username -location -date)

How to do this?I am very new to drupal.I am using drupal6.20.

Thanks in advance.

joachim’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Closing old support requests.