0 - 3 of 3 tags for RANDOM

I have a table TXN that has Transaction_ID and Store_nbr. Suppose also that I have a table SAMP that has Store_nbr and n_samples.
Suppose I want to take a sample of n_samples Transaction_IDs from TXN. I.e., I want the SAMP table to be able to drive how many transaction_id samples are taken from the TXN table. E.g.,

Hi All,
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.
For example
SELECT A.*, RANDOM(1,10) FROM TABLE_NAME A;
works
but 
SELECT A.*, 10 AS TEST, RANDOM(1,TEST) FROM TABLE_NAME A;
doesn't

We use SAMPLE RANDOMIZED ALLOCATION to generate random samples for a monthly survey that we operate.