Red Gate forums :: View topic - Feature Request: Distributing numeric data randomly
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Generator 1
SQL Data Generator 1 forum

Feature Request: Distributing numeric data randomly

Search in SQL Data Generator 1 forum
Post new topic   Reply to topic
Jump to:  
Author Message
DAndres109@aol.com



Joined: 03 May 2008
Posts: 14
Location: New York

PostPosted: Sat May 03, 2008 2:20 am    Post subject: Feature Request: Distributing numeric data randomly Reply with quote

Hi,

This would be a really cool feature, and I believe other users may have similar needs to my own. If this feature already exists, please let me know.

To be able to Randomly generate a single numeric quantity is great, but would it be possible to take that quantity and, when generating records for another table, be able to distribute that value amongst a random number of records.

For example, assume the following schemae exist:

Table A:
AId: primary
Sum: int

Table B:
BId: primary
AId: FK
Amount: int

Where A.Sum equals the sum of B.Amount where B.AId = A.AId

There are two directions that can be taken to satisfy this need: either I can generate B records and then add them up into A (min/max values on the sum of all B records that share AId values would be great), or I can take the A.Sum quantity and distribute it randomly amongst a random number of B records, as in:

A.AId = 1, A.Sum = 10000

B.BId = 1, B.AId = 1, Amount = 200
B.BId = 2, B.AId = 1, Amount = 4000
B.BId = 3, B.AId = 1, Amount = 4800
B.BId = 4, B.AId = 1, Amount = 1000

Any interest in adding these solutions as features?

David Andres
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group