I want to create a pipeline that runs a store procedure which populates a table with 0 to 10 rows, I then want to select each row and email the row (logic app) 1 row per email.
I'm stuck on the For Loop...
My sql table has a row number so I can do a lookup: SELECT max(RN) as MaxRN FROM [dbo].[table]
And I thought I could set a variable as 1 and just loop until variable greater than lookup value but I can't see how to do this easily in for each.
Also within the loop I was going to get the sql table row to email by simply: SELECT Value1,Value2 FROM [dbo].[table] Where RN = variable
Is this possible what I'm attempting?