Data Generation Question

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

Data Generation Question

Postby gsuttie » Fri Feb 26, 2010 9:37 am

Is there any way to take an existing table and then have it ignore say the primary key column and have the tool generate new data for existing rows.

We have some rubbish test data in a table - really long surnames and phone numbers which are garbage and Id like to generate some clean data which has actual names and proper phone numbers.

Is this possible ? or can you suggest a way to clean the data?

Thanks
Gregor
gsuttie
 
Posts: 44
Joined: Wed Nov 30, 2005 9:09 pm
Location: Glasgow, Scotland

Postby Anu Deshpande » Mon Mar 01, 2010 1:55 pm

Many thanks for your post.

What type of Primary column is it? I mean data type? Is it an Identity seed?

You can clean the existing data by selecting the option 'Delete data from table before generation'.

When you choose to delete the data from the table before generation, if possible SQL Data Generator truncates the table to remove all the existing rows before re-populating the table.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 692
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Reply

Postby gsuttie » Mon Mar 01, 2010 2:45 pm

Hi,

The primary key is a uniqueidentifier - I don't actually want to delete the data id rather like to say grab the surname columns and have the tool generate new surnames for the rows I have selected - that really would make the data generation powerful.

Cheers
Gregor
gsuttie
 
Posts: 44
Joined: Wed Nov 30, 2005 9:09 pm
Location: Glasgow, Scotland

Postby Anu Deshpande » Tue Mar 02, 2010 10:28 am

I have emailed you asking for the details.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 692
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Matching Composite Keys?

Postby great49er » Tue Mar 02, 2010 10:56 pm

Hi all,

I have a question similar to some others I've seen on the forums.

I'm trying to load a table with data (call it table E) that must have a matching record in a different table (P). Unfortunately, the unique identifier in P is a composite key between 2 columns (for example, ID & Company).

At first I thought I'd do a simple lookup using the SQL statement generator - select statement, just make sure I was grabbing 2 valid answers for each column, generate data, and then address the errors with my other db tool. Unfortunately, after generating 100k records I only ended up with 7 that match... that's too many errors for my other tool.

How can I pull a composite key out of table P and use it to populate table E so that my generated data in E will match a real record in P?
Thanks
great49er
 
Posts: 1
Joined: Tue Mar 02, 2010 10:33 pm


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests