Solved

Auto fill a test database

Posted on 2009-04-13
5
562 Views
Last Modified: 2012-05-06
Hello experts,

I need to build a test database with already defined table and column structures. However, I have no data in those tables and columns. I am building several queries and I am hoping to test them against some "close-to-real" data.

So, I am looking for a solution that will automatically generate logical data into these tables. (like date values to dates column, strings into text column, etc) I also want this solution to be more flexible, like I would tell this solution to generate say 100 rows of data or generate the dates with an hour interval.

Obviously, such a query can be built from scratch but i do not want to rediscover America and spend much time on something that has already been done.

Please let me know if such tool exists.

Thank you in advance
0
Comment
Question by:bozer
5 Comments
 
LVL 5

Expert Comment

by:brandonvmoore
ID: 24134662
Random dates within a specified time period is pretty easy.  And if your strings are meaningless and you don't care if they look like garbage then you could probably construct your own solution to this problem in the time it would take you to find one.

Let's say I wanted to make a random value that was between 23 and 28
1) Generate a random value between 0 and 1
2) Multiply by 5 (because 28-23=5)
3) Add 23

You can apply that logic to generate dates or characters within specific ranges.
0
 

Author Comment

by:bozer
ID: 24134687
Thank you for the comment.

However, I don't want to spend time with this for my goal is "making use of data" not creating them. That's why I don't want to create them myself, I'm hoping someone else (or a company) already coded something for this and I can use that for my needs.
0
 
LVL 2

Expert Comment

by:thomaslberg
ID: 24134689
Or if you want to spend a few bucks to have a program do it for you.

http://www.sqledit.com/download.html
0
 
LVL 5

Expert Comment

by:brandonvmoore
ID: 24134725
If you'll use your noodle for a moment you could do it yourself in about 5 minutes.  I'm also pretty lazy, which is why I'm not going to do it for you.  But for a case this simple I would certainly do it for myself before I spent money on a product.

I'm sure someone else will probably post some code that you can use eventuall though ;)
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 125 total points
ID: 24140812
>>I'm hoping someone else (or a company) already coded something for this <<
Then see here:
SQL Data Generator
http://www.red-gate.com/products/SQL_Data_Generator/index.htm
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now