cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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
Highlighted
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

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,501)