Using SQL, you can't be sure that the resulting list will preserve the order of the original lists.
Unsorted original lists and the use of primary keys or clustered tables, the query optimizer, size of lists and blocking factor among others are things I can recall that might change the way the output is returned... :-(
| [reply] |
Howdy!
Actually, you can ensure the order of the output, but it requires
that the base tables include a column with a sort key. Then you
have something you can use in an order by clause.
Fundamentally, generating the cartesian product of the input
lists will generate the elements of the output list. Controlling
the sequence is a minor additional task.
| [reply] |