AnsweredAssumed Answered

List of records from Two Different Tables

Question asked by Annette on May 31, 2016
Latest reply on May 31, 2016 by mikebeargie

Hello,

 

I have two tables with the following fields:

(TBL 1) Staff Activity (Fields) SA ID, UserAccountName, UserID, Client ID, Client Name, Date, Time, ActivityType

 

(TBL 2) Staff Non Client Activity (Fields) SNCA ID, UserAccountName, UserID, Date, Time, Activity Type

 

In Table 1 appointments(activity type) offered to the clients, the date and time of appointment are entered and it keeps the users ID for each.

 

In Table 2 appointments (activity type) that the user has but that are not directly related to a client are entered, for example, meetings or training, the date and time.  This also keeps the Users ID for each.

 

What I'm trying to do is have a view that lists the records from the two tables, essentially creating a diary view.  So it would look as follows:

 

31/05/16 - 9:00 - Assessment - Client Name (Table 1 Info)

31/05/16 - 10:00 - Team Meeting (Table 2 Info)

31/05/16 - 12:00 - Appointment - Client Name (Table 1 Info)

31/05/16 - 2:00 - Appointment - Client Name (Table 1 Info)

31/05/16 - 3:30 - Training (Table 2 Info)

 

It's not really a Join in SQL that I want, is it?? as in I don't want to add information from one record in one table to another record in the second table.  It's list each record from both tables where the User ID and Date is the same.  Is it possible to do this?

Outcomes