首页 > 代码库 > Save results to different files when executing multi SQL statements in DB Query Analyzer 7.01

Save results to different files when executing multi SQL statements in DB Query Analyzer 7.01

  
 

1 About DB Query Analyzer

DB Query Analyzer is presented by Master Genfeng,Ma from Chinese Mainland. It has English version named ‘DB Query Analyzer’and Simplified Chinese version named  技术分享 .

 

DB Query Analyzer is one of the few excellent Client Tools in the world for its’ powerful function, friendly interface, easy operation and applicability to every production of RDBMS.

 ① It lets you query ODBC data sources, author SQL scripts and queries, return query results to a grid or free-form text or a file, retrieve ODBC driver information,  execute multiple SQL scripts or stored procedures simultaneously,  save the result to files with high efficiency which is as quick as tools provided by database system.  What is more, from 6.01, DB Query Analyzer provides SQL Execute Schedule function to execute SQL scripts in certain time. If you select the option ‘SQL Schedule Reconnect’ in configurations window, the Schedule SQL scripts will be executed as long as the Database Server is in use, even though the Database Server had been down. ⑤ It allows users to define monthly or weekly SQL executing plans.   You can save each result to different file when executing multi SQL statements. ⑦ You can define the separator char among fields or define the record end char as well.   From version 6.03, without changing any Windows OS settings or configurations, DB Query Analyzer can run on anyMicrosoft Windows OS directly such as Windows 10, Windows 8, Windows 7, Windows Vista, Windows 2003, Windows XP, Windows 2000, Windows NT, Windows ME, Windows 9X.

 

In the New products & Tools reviews of programmer second issue of 2007, DB Query Analyzer had been strongly recommended.

 

Now the Simplified Chinese version of DB Query Analyzer is the top 50 database application software in the famous software website Zhongguancun online. In most case it lies the top 10 and it has been downloaded more than 120,000 times.

 

89 technical articles about DB Query Analyzer have been published in computer journal, BAIDU Library, the CSDN resource or my three blog-websites. 

 

 

2 Separator char and line end char

In 7.01, you can choose Tab, Comma,’|%|’ as the separator char when displaying the result by TEXT or saving the result to a file, what’s more, you can define the word as the separator char by yourself.If the configuration is changed, it will take effect immediately to the result displaying by TEXT or saving the result to a file.

技术分享

Figure 1   Fields seperator char items

 

In 7.01, you can choose \r\n, \n,\r and so on as the line end char when saving the result to a file, what’s more. If the configuration is changed, it will take effect immediately just to save the result to a file.

技术分享  

Figure 2   Line End char items

 

In 7.01, you can choose \r\n, \n,\r and so on as the line end char when saving the result to a file, what’s more. If the configuration is changed, it will take effect immediately just to save the result to a file.

 

 

3 Define the separator char among fields and the record end char and set save to multi files on

In 7.01, you can save each result to different file when executing multi SQL statements while turn on the item ’set save to multi files on’.

技术分享

Figure 3   Set the Fields Seperator char ‘|%|’, Line End char ‘;’ and turn on save to multi files

 

 

4 Save to different file when executing multi SQLstatements

技术分享

Figure 4  In the beginning, there is no file in the target directory

 

技术分享

Figure 5   Input 7 group SQL scripts

 

技术分享

Figure 6   Execute the SQL scripts group and input thefirst file name

 

技术分享

Figure 7   Seven files have been saved according to theSQL scripts group

 

技术分享

Figure 8   There are 7 files in the directory

 

技术分享

Figure 9   Open the file tb_road_4402.txt and see the Fields Seperator char ‘|%|’ and Line End char ‘;’

 

 

5 Summary

Today I just demonstrate that DB Query Analyzer is very good tool in big data processing.What’s more, 89 technical articles about DB Query Analyzer which have been published in computer journal, BAIDU Library, the CSDN resource or my three blog-websites. 

At present, DB Query Analyzer is widely used in our company and our colleagues are fond of it to access DB2 database.

 

 

DB Query Analyzer 7.01 download URL: 

http://xiazai.zol.com.cn/detail/43/420901.shtml

http://unitedpowersoft.cn/UpFile/DBQueryAnalyzer_English_701.rar

 

 

 

My blogs are http://blog.csdn.net/magenfeng

http://blog.sina.com.cn/magenfeng 

 

Interview with CSDN:  http://www.csdn.net/article/2014-08-09/2821124

 

 


89 technical articles about DB Query Analyzer have been published in computer journal, Baidu Library, the CSDN resource and my three blog-websites.

 

Thefollowing 7 articles have been published in computer journals.

Guangdong Highway settlementbusiness analysis system based on Star Schema in Data Warehousing according tonational standardization inComputer Era 7th issue of 2015 in Hangzhou.

DB Query Analyzer to cancel a running SQLstatement in Computer Era 12th issue of 2011 in Hangzhou.

DB Query Analyzer Returns Information in MoreDetail While Batch SQL Statement End of Execution in Computer Programming Skill& Maintenance 24th issue of 2011 in Beijing

The Application of the Transactions Control inDB2 with DB Query Analyzer in Computer Programming Skill & Maintenance 22nd issue of 2011 in Beijing.

How does DB Query Analyzer cancel the SQLstatement committed to DBMS in Computer Engineering & Software 6th issue of2011 in Tianjin.

The Application of the Transactions Control inOracle with DB Query Analyzer in Microcomputer Applications11th issue of 2011 in Shanghai.

    DBQuery Analyzer had been strongly recommended In the New products & Toolsreviews of programmer 2nd issue of 2007.

 

Thefollowing 78 articles have been published in Baidu Library, the CSDN resourceor my three blog-websites.

The DBMS that DB Query Analyzer Users often usecover all kinds of DBMS have been published.

How to configure ODBC DSN in Client to accessremote DB2 for Windows

How to configure ODBC DSNto access local DB2 for Windows

Which SQL statement is the trump card to thesenior software developer

Exe packer prevent DB Query Analyzer from beingdebugged have been published.

16 articles from The 1st tip of DB Query Analyzeto The 16th tips of DB Query Analyzer have been published.

The table name must be enclosed in doublequotation marks or square bracket while accessing EXCEL by DB Query Analyzer

How to download theinstallation package by ZOL Downer

DB Query Analyzer, the most excellent Universaldatabase Access tools on any Microsoft Windows OS

Demonstration of DB Query Analyzer 6.03Installation and Running on Microsoft Windows 8

How to easily create DB2 user function by DBQuery Analyzer 6.03

Install and run DB Query Analyzer 7.01 on MicrosoftWindows 10

A universal algorithm design of locating fixedlength string

How to generate the complex data regularly toMinistry of Transport of P.R.C by DB Query Analyzer

The new powerful SQL executing schedule monthlyor weekly in DB Query Analyzer 7.01 

Save results to different files when executingmulti SQL statements in DB Query Analyzer 7.01
 

 技术分享

技术分享

    

  

Save results to different files when executing multi SQL statements in DB Query Analyzer 7.01