Home > Forum > General > Running the SQL procedure so that the generated result can be downloaded as a .txt file

Running the SQL procedure so that the generated result can be downloaded as a .txt file
0

MVP

Hi Radek,

I have two ideas, I have tested none of them but each single step would work so they should work also in the combination. :)

1. Create binary attachment
1.a) Transform the result to a text
1.b) Convert the varchar result to varbinary
https://dba.stackexchange.com/questions/63743/converting-a-varchar-to-varbinary
1.c) Use the binary to add as an attachment
https://community.webcon.com/forum/thread/2375

2. PowerShell action and hotfolder
2.a) Execute a PowerShell action to call the sql procedure
2.b) Store the result in a folder with something like InstanceId_Result.txt
2.c) Add a hotfolder to check for new files
2.d) Create a process for each new file
2.e) Get the instance id from the file name and trigger a "move workflow"
2.f) Fetch the file from the temporary process created by the hotfolder
2g) delete the temporary process


Best regards,
Daniel

Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings