Dynamic value for SAMPLE RANDOMIZED ALLOCATION

Database

Dynamic value for SAMPLE RANDOMIZED ALLOCATION

I'm trying to input a dynamic value for SAMPLE RANDOMIZED ALLOCATION as in the example below. This produces an error: expected something like an integer or a decimal number...

Is there any way to input a dynamic value in this case?

select
customer_id, region
from customer_table
sample randomized allocation
when region = 'usa' then (
select amount_needed from master_targeting_campaign where country_code ='United States')
end)
with data primary index (customer_id);

 I have also tried the below example and received the same error:

select
customer_id,
region
from customer_table
sample randomized allocation
when region = 'usa' then master_targeting.amount_needed
end)
with data primary index (customer_id);
2 REPLIES
Teradata Employee

Re: Dynamic value for SAMPLE RANDOMIZED ALLOCATION

I don't believe that is possible. I tried several options but no dice.

Teradata Employee

Re: Dynamic value for SAMPLE RANDOMIZED ALLOCATION