Re: how to scramble data in a table
From: SND (sndip_at_cox.net)
Date: 02/16/04
- Next message: William Morris: "Re: newbie: how to implement vb recordsets in stored procedures"
- Previous message: Rahul Chatterjee: "execution plan"
- In reply to: Tim: "Re: how to scramble data in a table"
- Next in thread: Joe Celko: "Re: how to scramble data in a table"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 16 Feb 2004 08:46:48 -0700
Yes, I do want to munge a production db for demo purposes. Swapping IDs
will not work in my case since data is bound to a spefice type of person and
will not make sense in a demo if the person types are switched. Whiping out
first names is not an option either, since a search on first name is needed.
A dictionary table sounds like a good idea, and I will try that. Thanks.
"Tim" <Tim@NoSpam> wrote in message
news:uZJJLJG9DHA.2924@tk2msftngp13.phx.gbl...
> SND,
>
> Have you thought about creating a dictionary table of Surnames and in
their
> creating a mapping of where to go?
> Are you trying to munge a production database for demo purposes? If so,
then
> you could also consider not replacing name parts, but swapping ID values
> around instead and destroying the other identifying information - whiping
> out the firstnames, dictionary on surnames, randomising middle initials,
or
> some combination of these methods.
>
> - Tim
>
> "SND" <sndip@cox.net> wrote in message
news:d4WXb.1477$Mf.1107@okepread04...
> > Does anyone have a neat way to scramble data in one table?
> >
> > I have a Person table with fields (PersonID, LastName, FirstName,
> > MiddleName). PersonID is a sequential number from 1 - 1,000,000 and
there
> > are NO gaps in the sequence. I need the last names to be scrambled with
> > last names and so forth. ie. Smith, John D. could become Adams, Greg
B.
> >
> > The only way I know how to accomplish this is by looping through each
> Person
> > record and then select 3 random PersonID using the RAND() function and
> then
> > update the current PersonID with the LastName, FirstName, and Middle
names
> > of the rand() persons. This process works but, since I have a million
> > records, it takes my server close to 30 minutes to process.
> >
> > Does anyone know of a faster process to accomplish this?
> >
> >
>
>
- Next message: William Morris: "Re: newbie: how to implement vb recordsets in stored procedures"
- Previous message: Rahul Chatterjee: "execution plan"
- In reply to: Tim: "Re: how to scramble data in a table"
- Next in thread: Joe Celko: "Re: how to scramble data in a table"
- Messages sorted by: [ date ] [ thread ]