I have a batch of SQL code, where I need to calculate an aggregate in a
SELECT and then use that value in a second SELECT. I am using MySql 4.0 so
unfortunately I cannot use a subquery (which is how I'd like to do this
:-)).
So I run the first SELECT and assign the aggregate to a variable somet
I think you'll find you can do what you want with a cross join. A cross join
will join every row from the first table with every row from the second
table. It will not randomly do this, so you'd have to be creative in
"randomly" selecting rows in the WHERE clause. Here's how you could do this
w
I think you'll find you can do what you want with a cross join. A cross join
will join every row from the first table with every row from the second
table. It will not randomly do this, so you'd have to be creative in
"randomly" selecting rows in the WHERE clause. Here's how you could do this
w