cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lscoffield
Regular Visitor

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.

View solution in original post

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.

View solution in original post

Helpful resources

Announcements
secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (8,154)