By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,170 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

Combinging three fields/columns for "factorial" result?

P: n/a
We want to create fictional character names for a children's project,
and have selected 30 first names, 30 last names, and want to include 26
(a-z) middle initials. Therefore there are 30x30x26 = 23,400 possible
unique names in the format of "First MI Last" such as "James B. Happy"
that we wish to create and print a few hundred at a time onto paper

(We have 30 other first names for females, and can just do the required
operation twice, so please ignore that complicating factor)

Question is how can we take these three fields of 26, 30 and 30 records
each, in either Access 2000 or Excel 2000 and end up with the 23400
names in a single field or comma delimited form.

Our futile attempt yesterday had us researching combing "strings" and
"concatenation" and "factorial functions"- and we couldnt figure it

Do we start with one table with three fields, or three tables with one
field each. Where do we input the required function? Thanks.

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
If they're in the same table, create a query for each field so you can
treat each "variable" as a separate table.

Put them all in a query together, but without joining them.

SELECT a.FirstName, b.MI, c.LastName
FROM a, b, c;

Note the lack of joins. That will give you a nice Cartesian product...
just like you wanted.

A X B X C. so you'll end up with 26 X 30 X 30 records.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.