Hi,
It is possible to return a calculated number of empty rows that I can UNION join, with the number of empty rows calculated based on the number of rows returned in the other query? I always want to return 20 rows, and if the number of rows from the first query is less than 20 then the rest will be blank.
I though of doing this with a calculated LIMIT but I get an error.
SELECT a,b,c
FROM table1
WHERE d>10
UNION
SELECT '' AS a, '' AS b, '' AS c
FROM table1
LIMIT 20 - (SELECT COUNT(*) FROM table1 WHERE d>10)