Cross Join with QueryBuilder (NOT cross database)

Hi,

In SQL I can type the following:

SELECT *
FROM T1
CROSS JOIN T2

This will give me the cartesian product of the two tables. E.g.

CREATE TABLE T1 (label CHAR(1) PRIMARY KEY);

CREATE TABLE T2 (score INT PRIMARY KEY);

INSERT INTO T1 (label)
VALUES
	('A'),
	('B');

INSERT INTO T2 (score)
VALUES
	(1),
	(2),
	(3);

Running the above SQL query on these tables would give a result set that contains:

label | score
-------+-------
 A     |     1
 B     |     1
 A     |     2
 B     |     2
 A     |     3
 B     |     3

How can I acheive the same result using QueryBuilder?

Thanks
Steve

In SQL, a CROSS JOIN would be the same as a JOIN on 1=1, so in theory, you could do something similar with the query builder. Or any criteria which will be true for all combined rows. Like join on the PK column > -1 or something like that.

Doh! - I was so focused on the CROSS JOIN syntax (and lack of it in Servoy), I didn’t stop to think what the underlying logic would be!

Thanks Scott
Steve