SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Generating Dummy Data


Generating Dummy Data

Author
Message
archangel3
archangel3
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 325
Nice article. A quick and simple way to get lots of data into tables.
webrunner
webrunner
SSCertifiable
SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)

Group: General Forum Members
Points: 7523 Visits: 3994
Yes, that is usually the challenge. Especially a lot of repeats of the same dummy data.

Perhaps an idea would be to have a framework, and depending on what data needs to be tested, have different, customizable scripts for it.

So, if you want to test addresses, have a script that generates dummy, but realistic addresses, and so on. I'm thinking a "dummy data" generation database of its own that would house lookup tables to serve as the basis for the different types of dummy data that is needed. I'd think that for most cases, a set of common data would suffice (names, phones, emails, addresses). But the basic idea could be tailored for different uses.

Not the whole answer, I know, but maybe it's a start.

- webrunner

-------------------
"I love spending twice as long and working twice as hard to get half as much done!" – Nobody ever.
Ref.: http://www.adminarsenal.com/admin-arsenal-blog/powershell-how-to-write-your-first-powershell-script

"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Jamie Ingram-729524
Jamie Ingram-729524
Mr or Mrs. 500
Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)

Group: General Forum Members
Points: 503 Visits: 439
That's sort of what I was aiming at.
You can populate as many tables as you want with data and just use cartesian joins to give the bulk.
I have reused last names as street names.

The keyword here is bulk.

I'm happy to work with people on this framework.

Cheers

Jamie:-D

We are the pilgrims, master.
We shall go always, a little further.

webrunner
webrunner
SSCertifiable
SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)

Group: General Forum Members
Points: 7523 Visits: 3994
Jamie Ingram-729524 (8/28/2013)
That's sort of what I was aiming at.
You can populate as many tables as you want with data and just use cartesian joins to give the bulk.
I have reused last names as street names.

The keyword here is bulk.

I'm happy to work with people on this framework.

Cheers

Jamie:-D


Oh, sorry! I hadn't looked at the code details, was just commenting on the general idea. I will take a closer look and test it out to see if I can offer further feedback.

- webrunner

-------------------
"I love spending twice as long and working twice as hard to get half as much done!" – Nobody ever.
Ref.: http://www.adminarsenal.com/admin-arsenal-blog/powershell-how-to-write-your-first-powershell-script

"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
kenny.ratliff1
kenny.ratliff1
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 2
Greetings Jamie and anyone on this string -

I'm hoping to create dummy data for use in some health examples. This article look is great in getting me started that direction! However, I'm getting an error when I use the CREATE SEQUENCE that states 'Unknown object type 'sequence' used in a CREATE, DROP, or ALTER statement'. I am using SQL 2012, which I understand is the only version the SEQUENCE statement works.

Forgive me, as I'm a GIS guy and not a SQL guy! So maybe I'm missing something pretty simple?

Thanks!
Kenny
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)SSC Guru (202K reputation)

Group: General Forum Members
Points: 202966 Visits: 41947
kenny.ratliff1 (9/8/2013)
Greetings Jamie and anyone on this string -

I'm hoping to create dummy data for use in some health examples. This article look is great in getting me started that direction! However, I'm getting an error when I use the CREATE SEQUENCE that states 'Unknown object type 'sequence' used in a CREATE, DROP, or ALTER statement'. I am using SQL 2012, which I understand is the only version the SEQUENCE statement works.

Forgive me, as I'm a GIS guy and not a SQL guy! So maybe I'm missing something pretty simple?

Thanks!
Kenny


Hi Kenny,

Welcome Aboard!

I recommend that you start a new thread on the SQL Server 2012 forum of this site and include the code that you're having problems with.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search