Posts

Showing posts from January, 2014

Generating INSERT statement from SELECT using SQuirreL SQL

Image
There are often time during development where you would want to test your application with various type of sample data, and you would want those data to be share with other team member as well. The scenario that I ran into recently is we have some sample data that was enter to a system through a web interface, and for reports developments purposes we need those data to be shared among the team members, so we start to look into exporting those data out using SQL SELECT statements (with the correct WHERE clause) then converting them to equivalent INSERT statement; there are of cause several ways to do this, but I prefer the easy way, using SQuirreL SQL . The insert script can them be shared among the team members. Following is the steps for completing this Install  SQuirreL SQL Make sure you have  JRE7  installed on your machine Create connection to you database Depending on your database type you need to use different drivers Create the Alias to your database and enter