Records Quadrupling in Query - TableDesign Prob? Pls Help

T

Tom Ellison

And now, just to absolutely mystify everybody, I'll suggest it CAN be done,
sort of.

Write a query that shows:

Fred Gerbil
Fred Snake
Tom Bird
Tom Cat
Tom Dog

Rank these:

Fred Gerbil 1
Fred Snake 2
Tom Bird 1
Tom Cat 2
Tom Dog 3

Do the same for fruit:

Fred apples 1
Fred peaches 2
Fred pears 3
Tom apples 1
Tom bananas 2

Create a full outer join on name/rank

Fred 1 Gerbil apples
Fred 2 Snake peaches
Fred 3 <null> pears
Tom 1 Bird apples
Tom 2 Cat bananas
Tom 3 Dog <null>

Is that close to what you wanted?

This is not a particularly useful thing, I suspect, but it's fun to play
with. A couple of nice skills are illustrated: ranking and outer joins.
Nothing you won't use elsewhere eventually, so a nice exercise.

Tom Ellison
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top