본문 바로가기
RPA(english)/RPA and SQL(english)

(MS Power Automate Desktop)4.POWER AUTOMATE DESKTOP TO Query(CREATE, INSERT, DELETE)

by RPA 챗봇 2022. 6. 14.
반응형

A connection between POWER AUTOMATE and DB is required to fly the query. Please refer to the article below.

2022.06.13 - [RPA(english)/RPA and SQL(english)] - (Link RPA to SQL) 3. Connect SQL from Flow

 

(Link RPA to SQL) 3. Connect SQL from Flow

1. MYSQL and Heidi SQL must be installed. 2022.06.12 - [RPA(english)/RPA and SQL(english)] - (Link RPA to SQL) 1. Install MYSQL (Link RPA to SQL) 1. Install MYSQL SQL is available on MS POWER AUTOMA..

inrpa.tistory.com


 

 

1.Query (CREATE, INSERT, DELETE)

'Search for 'SQL' and drag 'Execute SQL Statement' to drop it in an empty space..

 

The following screen will appear:

You might need to connect SQL to multiple databases, multiple accounts, so you can use the elements you want to connect to, as shown in (1) in Figure
You can choose. We have only one, so there is no correction.

 


1-1. CREATE

A query statement that creates a table called test. A and B are column names and INT is the data type. You can change it as you want.

CREATE TABLE test
(A INT,
B INT)

 

Please put in the above query.

 

RESULT

If you run it, you can check that the table has been created as shown in the picture.

 

 

1-2. INSERT

Now that the table has been created, let's put in the data.

 

The data type of the column was INT, so let's put in the numbers.

INSERT INTO test
values(1,2)

 

Please put in the number you want.

RESULT

 

 

1-3 DELETE

Let's erase the data we put in.


If you want to get rid of all the data in the table,

DELETE FROM test

 

If you only want to remove rows of data from a table that are specific,

DELETE FROM test

WHERE A =1

 

You can enter the desired conditions in WHERE.

RESULT


If you experiment with a query on Heidi SQL and succeed, Power Automate also works fine.
However, please proceed with the test first and fill it out in the flow.

When I was writing, I was writing in order for the first learner to follow.

However, from now on, we will focus on certain features and 'flow' writing tips.

Please keep that in mind.

Thank you.

반응형

댓글