WHERE Clause
JVM65
Posts: 3
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
ID IN
(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.
/Janne
This can be done with a WHERE Cluase for each table that want to filter, like
ID IN
(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.
/Janne
Comments
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.
Thank you for quick respons.
/Janne