web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Rows Lookup Betwee...
Power Automate
Unanswered

Get Rows Lookup Between SQL Tables

(0) ShareShare
ReportReport
Posted on by 10

Hi everyone,

 

New to PowerAutomate and been doing some searching but couldn't find a good solution yet:

 

I'm trying to pull the correct fields from a SQL database into SharePoint using Get Rows.

The SQL database has multiple tables and I'm trying to figure out the best way to pull the fields.

 

For example I have one main table in the database but it contains GUIDs for many fields such as 'Customer GUID'.

There would be a separate table in the database with 'Customer GUID' and 'Customer Name'.

I currently have the flow set up to pull from the main table via Get Rows but that only contains the 'Customer GUID'.

What would be the best way to pull the 'Customer Name'?

 

Any help would be much appreciated, thanks!

Categories:
I have the same question (0)
  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at
    Re: Get Rows Lookup Between SQL Tables

    Hello @Jayt91 

     

    You should use „Execute a Oracle query“ and join the fields using sql.

     

    But I also have a question. It sounds like you synchronize data from dataverse to oracle? Why would you do that and if that’s the case, why don’t you use dataverse to get the data?

  • Jayt91 Profile Picture
    10 on at
    Re: Get Rows Lookup Between SQL Tables

    Hi @Matthy79, thanks for the reply!

    Sorry I'm very new to this so not sure if I'm following.

    I tried the Execute a Oracle query but it looks like I need to be connected to an Oracle database.

    Do you have an example you can show me?

  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at
    Re: Get Rows Lookup Between SQL Tables

    You also need a connection with the other action. Use the same connection (reference).

  • Jayt91 Profile Picture
    10 on at
    Re: Get Rows Lookup Between SQL Tables

    Just to confirm the steps, from my original get rows, I should press the + sign below to Execute a Oracle Query, then enter the same connection details? The connection that I used before was a SQL database, when I try adding the Execute a Oracle query there seems to be no option to use the same database. 

  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at
    Re: Get Rows Lookup Between SQL Tables

    OK, it seems like I didn't realize that you mean sql server. There are a lot of sql databases and I usually work with oracle. In your case the action is "Execute a SQL query" or if you use another SQL database, just pick the action that looks like it but uses the same connection.

  • Jayt91 Profile Picture
    10 on at
    Re: Get Rows Lookup Between SQL Tables

    Oh okay, got it. Yep I tried using the Execute a SQL Query and used the same connection but unfortunately it didn't end up working:

    Jayt91_0-1705344254771.png

    It looks like the error has something to do with an on-prem gateway so I guess I'm probably out of luck for this method. Any other suggestions on how to join the fields?

     

  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at
    Re: Get Rows Lookup Between SQL Tables

    That is really a total … limitation.

     

    Ok, you can create a view to do the joins and query the view.

  • Jayt91 Profile Picture
    10 on at
    Re: Get Rows Lookup Between SQL Tables

    Unfortunately 😂

    I haven't worked with creating a view before, could you point me to where to create one?

  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at
    Re: Get Rows Lookup Between SQL Tables

    You have to create it on the sql server. Maybe someone from your sql server admins can help/guide you.

  • Jayt91 Profile Picture
    10 on at
    Re: Get Rows Lookup Between SQL Tables

    Thanks I'll give that a try

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard