I have used the random(<min_value>,<max_value>) function to generate numbers. However, this only works when the values then numbers are entered manually.
SELECT A.*, RANDOM(1,10) FROM TABLE_NAME A;
SELECT A.*, 10 AS TEST, RANDOM(1,TEST) FROM TABLE_NAME A;
I get a "Select Failed 3707: Syntax error expected something like an integer or a decimal or a ... between ',' and the word 'TEST' "
Ideally I'd like the inputs to the function to be values from the table itself
Any help on this would be appreciated!
RANDOM only accepts hard-coded values.
You might try
SELECT A.*, 10 AS TEST, RANDOM(1,2147483647) MOD TEST + 1 FROM TABLE_NAME A;