Hello Everyone! I am new to IPA and trying to build an IPA process that can run a SQL script with multiple queries and do multiple updates to export to Excel CSV file then to upload the output CSV to the external website. I try to use "SQLQRY" node but it looks like it is more a single query rather than multiple queries which can be end up to a more complicated process as seen below in 1st picture.
I also try the "FIile" node with "Write To File" in the Excute mode and "Output file" but still not getting any better. (picture 2) Can anyone please advice on how it could be done to execute/run a SQL script with multiple queries/update to export it to csv file so it can be upload to external web site. Any sample process that similar to this process would be appreciated.
Thank you much in advance.
I don't really understand what you're trying to do, but I do see one issue with your flow. SQL Query Nodes will return multiple records, but you have to deal with each record within the loop like this:
If you need to do multiple queries from different sources (that can't be done in a single SQL join), then the queries need to be nested somehow before writing to the output file.
I hope this helps point you in the right direction. Good Luck.
Gosh, maybe I am just an old programmer here, but it seems to me like all the processing you want to do might be better handled by a processing language - i.e. a 4GL program that creates an output file.
Thought I responded, but haven't seen it pop up.
I tired of the data iterator when on a project that required reading a flat file into a custom table, working the data and then exporting a CSV to be loaded back into Lawson GLTRANSREL. So the approach I developed was to use the SQLTXN node using the SQLBULK INSERT statement to load the flat file, and then use a Windows SYSCMD node calling a batch file containing MS SQL Server SQLCMD using a script file and output the data. The Data Iterator approach went from 10-15 minute's read input to 5 seconds using the BULK INSERT, and 10-15 minute extract to 30 seconds using SQLCMD's. The other beauty was the ability to stack the SQLCMD's in the batch file to process multiple output files and to use parameter's for BOTH the batch file and pass to the SQL scripts.
Ethan,
I am doing something similar and would love to see the example flow you can up for this - do you still have it? Would you mind sharing it with me?
Many thanks, Chrs
Shane, sorry I completely missed your post a few weeks ago. Chris and Shane, a very generic sample of what we did with SQL Server and IPA is attached. Please let me know if you have any questions.