views:

40

answers:

2

Hi,

I have to create a test database for some external developers to use.

We have created a copy and rather than manually filling it with junk data i want to scramble the text fields.

Are there any easy ways of doing this?

Im using sql server 2005 Sp

+1  A: 

Not quite sure if this is the same as Steven's scenario, but name & surname 'scrambling' is quite common to preserve customer confidentiality when a DB goes from a secure (e.g. Prod) to insecure environment (e.g. Dev, or offsite)

You can select a random row in SQL http://www.petefreitag.com/item/466.cfm

So then what you could do is e.g. run a cursor across all rows in the table, selecting a random FirstName row and Surname Row using the above and then updating the current record with the random firstname and surname columns?

nonnb
Thanks for your response.
Steven
+2  A: 

This might help.

Edit: here's a thread on another forum that may also be of use.

Good luck!

Hal
I think this is perfect for what i need. Many thanks Sp
Steven