cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mike8
Level 10

Change Table1 name from action Execute a SQL query

Hello everyone,

Does anyone know how can I change the name of Table1 that the action Execute a SQL query returns?
For example, if I have 2 select statements in the action it will return Table1 and Table2. Instead of Table1 and Table2, I would like to define the names of the tables. Like Table1 --> Clients and Table2-->Orders. 
I would like to do that because I use these name in actions below and if I add an extra select statement in the beginning of the Execute a SQL query the new select statement will be Table1, Clients will be Table2 and Orders will be Table3. The script in Execute a SQL query it is more complicated than asking for data from 3 tables.
So to sum up the question is: Does anyone know how can I change the name of Table1 that the action Execute a SQL query returns?

Thank you

2 REPLIES 2
RookieI
Level: Powered On

Re: Change Table1 name from action Execute a SQL query

Hi @Mike8 ,

 

In theory, this is not possible because the Table name are stored in the current connection.

 

In the process of configuration, you need to rely on these Table names to configure related actions.

 

I think the feasible way is to change these table names directly in the Sql server, and then reconfigure the relevant actions.

Highlighted
Mike8
Level 10

Re: Change Table1 name from action Execute a SQL query

Hello,

I am referring to the query results in outputs of the Execute a SQL query action.
Something like this:

{
"OutputParameters": {},
"ResultSets": {
"Table1": [
{
"Client": "Client1"
}
],
"Table2": [
{
"OrderNumber": "Order1"
},
{
"OrderNumber": "Order2"
}
]
}
}

Does anyone knows how to set the names of Table1 and Table 2 to a different name?
SQLoutputs.PNG
 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

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.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 336 members 1,619 guests
Please welcome our newest community members: