Currently I have this statement
IF(0.5 < SELECT (FLOOR(10*RAND()*pResourcium) AS TestVar FROM siegeverse.rooms rm) AS T))
THEN SELECT 'TEST'
Any idea why it is failing? Trying to get it to output test for each row if the selected element is greater than 0.5
Thanks!
SELECT statement in such scalar comparison contexts should return only one row. In your case, it might be returning multiple rows and so is failing. The following rewritten query is close to what you are interested in: