Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mix tables together based on a set of rules

Status
Not open for further replies.

rostb

Technical User
Feb 23, 2007
2
US
Hey guys. Didn't even know how to name this thread properly. Here's what I have: a few tables with identical structure. Let's say they look like this:
Index(autonumber) | ID | Data1 | Data 2
Lets say I have 3 of them. I need to mix them together so for every lets say 4 records of the first table was one record of the second one and 2 records of the third one. So they would be like this:
1 | record from table 1
2 | record from table 1
3 | record from table 1
4 | record from table 1
5 | record from table 2
6 | record from table 3
7 | record from table 3
8 | record from table 1
and so on.
Just an example. I need to be able to do this with any number of tables and any set of rules.
Any idea how to do this???
Sorry for my crappy English.
 

hi rostb,

Don't worry about the "english" thing (some of us 'mericans ain't got the hang of it yet!)

to your question. When you do get a chance, could you provide a few more details about what you are trying to do and how you are trying to do it? Are you looking for output in a Report format? Will queries fulfill your requirements?

Upon first read of your post my mind wandered to the notion of "matched" and "unmatched" queries. Then I thought about Crosstabs, and pizza (hey, I already said my mind was wandering [smile])

Your solution, while not likely to come from me, might possibly be speeded up if you addres the issues above.

Best of luck!
DoN



[blue]________________________________________________________
Some folks put their money where their mouth is. I just pay my bill. [/blue]
 
Thanks DoN. This resulting table would be a feed for a program that uses it. So I need a result as a table. And keeping that particular order, whatever that might be, is very important.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top