CREATE TABLE T(N TINYINT PRIMARY KEY);
SELECT "N" AS "Number" FROM "T"
SELECT "T1"."N" AS "N1", "T2"."N" AS "N2"
FROM "T" AS "T1", "T" AS "T2"
SELECT "T1"."N" AS "N1", "T2"."N" AS "N2", "T3"."N" AS "N3", "T4"."N" AS "N4", "T5"."N" AS "N5"
FROM "T" AS "T1", "T" AS "T2", "T" AS "T3", "T" AS "T4", "T" AS "T5"
SELECT "T1"."N" || '-' || "T2"."N" || '-' || "T3"."N" || '-' || "T4"."N" || '-' || "T5"."N" AS "Concatenation"
FROM "T" AS "T1", "T" AS "T2", "T" AS "T3", "T" AS "T4", "T" AS "T5"
This is simple with a spreadsheet too. They are the the five-digit base-eight numbers (8⁵ = 32768 of them) except:dodgeitorelse wrote:I have numbers 1-8 and I want to use 5 out of the 8 in my results. I also want to have results shown with a hyphen seperator. I want to find all possible combinations where each number can be used more than once for example one result could be 7-7-7-7-7.
$ perl6 -e 'my @d=(1..8); say .join("-") for (@d X @d X @d X @d X @d)'
1-1-1-1-1
1-1-1-1-2
1-1-1-1-3
...
8-8-8-8-6
8-8-8-8-7
8-8-8-8-8
BeeRayDee wrote:Curious if you have found the solution you were seeking.
I completely understand the question, looking for the solution as well.
...
Users browsing this forum: No registered users and 19 guests