Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a table with a single field as below:
LOAD * Inline [
Letter
a
b
c
];
Now, I would like to write two queries which will return:
1) all the possible combinations: 'aa', 'ab', 'ac', 'ba', 'bb', 'bc', 'ca', 'cb', 'cc'
2) only the unique combinations between the values: 'ab' , 'ac', 'bc'
Any idea?
Thanks,
Aviad
The following takes all chars and should be helpful how it might be done:
t1: load chr(96 + recno()) as L1 autogenerate 25; join(t1) load chr(96 + recno()) as L2 autogenerate 25;
t2: load L1 & L2 as L3 resident t1 where L1 & L2 follows 'at' and L1 & L2 precedes 'bc';
Just adjust to your real chars and conditions.
- Marcus