Revolving around the core of technology
Hi, I have a problem where I need to run 8 SQL queries in batch mode and would like to export the results of each query to a separate file. As far as I could tell from searhcing the site, I need to manually export each query resultset. Is there a way to programmatically export SQL queries to CSV (much like the MySQL syntax INTO OUTFILE)? I'm currently using the free trial version, but will be happy to update to the paid version if that functionality is available there.
BTW, this tool saved me many hours of agony fighting with Access. Much appreciated!
Rajarshi,
There is no exact equivalent of INTO OUTFILE in WinSQL. You can certainly create an export template and then export the data that way.
We are working on the new release of WinSQL (version 10). Besides other features, the new version has a special comment that is parsed locally in WinSQL and will allow saving the grid contents automatically to a CSV file. For example you can write something like:
-- wn_SaveToCSV C:\Temp\customers.csv
SELECT * FROM Customer
Besides displaying the data in grid, the above comment will make WinSQL to save the contents to customers.csv file.
The next version of WinSQL is currently under beta testing. Send us an email to support@synametrics.com if you like to beta test it.
Hi, does the current beta of v10 support this feature?
Yes, it is there in the Beta. Visit http://web.synametrics.com/WinSQLBeta.htm for details.