Frustrations with Data Generator

The simplest way to populate your database with test data.

Frustrations with Data Generator

Postby gsuttie » Wed Feb 05, 2014 11:08 am

I have one table which I want to insert 1000 rows, I want the primary key column to have identities 1-1000 - nothing I try seems to put the data in that order, it seems to aways randomise them even when the preview says 1, 2, 3, 4, 5.

Also a really useful addition would be to be able to have the option to script out the data using data generator so I can actually see whats about to be inserted before it goes ahead and does it.

To be able to script out the data would be a great addition unless I cant see how to do it.
Posts: 46
Joined: Wed Nov 30, 2005 8:09 pm
Location: Glasgow, Scotland

Postby Brian Donahue » Thu Feb 06, 2014 4:43 pm


I believe the ability to output the generated data to script or text file has already been mentioned here: ... -Generator

If you are referring to the preview window, you'll want to change the distribution setting from random to sequential in order to get the int generator to write the values in numerical order.

With SQL Server, even if data is generated in a certain order, you may find that when you retrieve it from SQL Server it comes back in a different order, because of the way MSSQL Server stores data. You may want to include an ORDER BY clause in the query if you want results sorted on a particular column in ascending or descending order.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Return to SQL Data Generator 3

Who is online

Users browsing this forum: No registered users and 0 guests