WHERE Clause

Compares and synchronizes SQL database content.

WHERE Clause

Postby JVM65 » Fri Apr 20, 2012 11:32 am

I'm using SQL Data Compare to populate my test environment with some data from the production environment.

This can be done with a WHERE Cluase for each table that want to filter, like

(SELECT ID FROM TestDB1.[dbo].TestTable_ID)

Is this the best way to do it when you just need a small selection of data for test?

My database consists of more than 100 table and I don't want to edit a WHERE Clause on every table.

Posts: 2
Joined: Fri Apr 20, 2012 11:22 am
Location: Stockholm, Sweden

Postby chriskelly » Fri Apr 20, 2012 4:25 pm

Unfortunately, this is the only way to do what you want to do in SQL Data Compare.

However, we have an alternative tool called SQL Data Generator which is specifically designed to aid with the insertion of test data into development databases. Using this tool you can specify your test database in the project and specify the number of rows to generate (in Tools > Application Options > Generation tab and Specify number of rows).

At this point you will need to make a decision. Either generate 'random' nonsense data into the tables, or specify your source tables (containing the data). Unfortunately, the latter will need to be done for each table individually . But the former, will be much quicker to set up (as it uses 'random' data generators as standard).

http://www.red-gate.com/supportcenter/c ... s_or_views

But if you have any questions then please let me know.
Last edited by chriskelly on Mon Apr 23, 2012 11:51 am, edited 1 time in total.
Chris Kelly
Technical Support Engineer
Posts: 368
Joined: Mon Apr 19, 2010 1:44 pm
Location: Cambridge, UK

Postby JVM65 » Fri Apr 20, 2012 5:32 pm


Thank you for quick respons.

Posts: 2
Joined: Fri Apr 20, 2012 11:22 am
Location: Stockholm, Sweden

Return to SQL Data Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests