cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lscoffield
Level: Powered On

How do you join 3 tables

How do you join 3 tables? here is the simple SQL

 

    SELECT studentClassMap.StudentId, studentClassMap.ClassId, [user].*, class.*

        FROM StudentClassMap as studentClassMap

        LEFT JOIN Class as class on class.ClassId = studentClassMap.ClassId
        Left JOIN [User] as [user] on [user].UserId = studentClassMap.StudentId

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How do you join 3 tables

@lscoffield 

I assume you mean how to do this in PowerApps...

If so then consider the following formula (in this case putting into a collection):

 

ClearCollect(colStudentClassMap, 
     AddColumns(
          StudentClassMap,
          "Class", Filter(Class, ClassId=StudentClassMap[@ClassId]),
          "User", Filter(User, UserId=StudentId)
     )
)

I hope that is what you are looking for.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
1 REPLY 1
Super User
Super User

Re: How do you join 3 tables

@lscoffield 

I assume you mean how to do this in PowerApps...

If so then consider the following formula (in this case putting into a collection):

 

ClearCollect(colStudentClassMap, 
     AddColumns(
          StudentClassMap,
          "Class", Filter(Class, ClassId=StudentClassMap[@ClassId]),
          "User", Filter(User, UserId=StudentId)
     )
)

I hope that is what you are looking for.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 54 members 4,660 guests
Please welcome our newest community members: