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

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.