I'm developing an application that is using SQL Server for storage. For development/testing purposes I need a subset of production data that will be anonymised, converted into
insert into table.. statements and checked into version control.
So far I've been doing
select top 100 * into tempTableName from TableName
then removing any personal data:
update tempTableName set firstname = 'Joe', Surname = 'Doe', Email = 'email@example.com', etc...
Then generating scripts with data and tick only
That takes a fair chunk of time and error-prone - especially the bit where I remove personal data (think what would happen if I put wrong table name into the update).
Is there a better way to get sample data from production into scripts?