I am trying to randomly assign names within a set list of names to phone calls in SQL. For example,
Date |Customer Number| Consultant Name
2/24/18 |193-245-6445 | Jill
2/15/18 |123-456-4663 | Amy
I am trying to randomly assign names within a set list of names to phone calls in SQL. For example,
Date |Customer Number| Consultant Name
2/24/18 |193-245-6445 | Jill
2/15/18 |123-456-4663 | Amy
Agree with The Impaler, You need to provide more information. Assuming that it is Oracle and you have two tables you need to join. You may hypothetically
select table1.Date, table1.Customer_Number, table2.Consultant_Name
from <Table 1> table1
left join (select rownum as rownumout, tb2.*
from <Table 2> tb2) table2
on 1 = 1
where table2.rownumout = floor(dbms_random.value(1, 100));
Assuming you have 100 names in table 2. If more than increase the range.