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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Left Join in Power Aut...
Power Automate
Unanswered

Left Join in Power Automate Desktop

(0) ShareShare
ReportReport
Posted on by

Hello, I'd like to starting my question by thanking anyone who might have any insight on my problem and is willing to help.

I have a Flow in Power Automate Desktop where I connect to a SQL Database and extract data from 2 different select statements.

The first one returns me a database containing 3 columns: id_func , name and cellphone_number and looks like this:



 

select id_func,name,cellphone_number
from tb_funcionario

 

select1.png












The second one returns only two columns: product_number and id_func.

 

 

select product_number,id_func
from tb_dist

 

select2.png

 









Then, I'm running another SQL statement where I'm trying to join both of them:

 

 

select * from %Fist_Select%
left join %Second_Select%
on ([%%Fist_Select%].id_func) = ([%Second_Selec%].id_func)

 

join.png



But I'm getting the following error:

 

 

Error in SQL statement The identifier that starts with '[...]' is too long. Maximum length is 128.
Incorrect syntax near 'data'.

 

data.png

 
I'm thinking that the problem might be in syntax, but every other sample of code that I've seen is similar to mine. Help please

PS: First question in here so, forgive me for anything different from the "normal" way to ask.

  • VJR Profile Picture
    7,635 on at

    Hi @Ricard_Gab 

    Simply use one SQL statement which will have the Join query instead of the two different.

  • Kaif_Siddique Profile Picture
    2,108 Super User 2024 Season 1 on at

    Use SQL Left Join query.

    Select * from tb_funcionario left join tb_dist on tb_funcionario.id_func = tb_dist.id_func;

     

    Kaif_Siddique_0-1661536331575.png

     

    Hope this will help you.

    Please accept the solution if this works for you. 

     

    Regards

    Kaif

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 273 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 172 Super User 2026 Season 2

Last 30 days Overall leaderboard