cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

how to check wether sql table has no rows in flow

i have sharepoint list which i want to move from sharepoint to azure sql table , and want to check first wether sql table is empty or not

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Tejaswini1234 ,

 

Please check this thread and see if it helps:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/how-to-do-modification-insertion-and-del...

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Dual Super User III
Dual Super User III

Hi @Tejaswini1234 

 

You can execute a query -> Select * from tableName and then this will result in  a list of items. You can check the length of this list and if it is 0 (empty DB) then configure the next actions of the flow. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Community Support
Community Support

Hi @Tejaswini1234 ,

 

Take Sql server as an example to show how to determine whether sql table is empty.

Azure sql will return value, return all rows as an array, you could put value in the array variable.

Then use length() function to determine if the array variable is empty. If the result is equal to 0, the table is empty.

Like:

55.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

How to insert ,update and delete record  in sql table as if it performend in sharepoint  list  using flowio5.pngio4.pngio3.pngio2.pngio1.png.

io1.pngio2.pngio3.pngio4.pngio5.png

Hi @Tejaswini1234 ,

 

Please check this thread and see if it helps:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/how-to-do-modification-insertion-and-del...

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (12,907)