Solved

Auto fill a test database

Posted on 2009-04-13
5
565 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

730 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