I have tables like:
1. Rep(RepID, rep_name,Active) -> has id= 1 to 100 records
2. Role(RoleID, RoleCode, Active) -> has id = 1 to 30 records
3. RepRole(ID, RepID, RoleID)
and I need to populate the below table:
So i am generating the data for created_repID randomly between 1 to 100. And I need to populate the Tables_1.Created_roleID from the REPROLE table for that respective Created_repID. How can I do this in RedGate generator tool?
Here i tried to write a query:
how to complete the below query. I need to pass the table_1.Created_repID as the parameter to the below query.
"Select RoleID from RepRole where repid =" + ?;
please give me a suggestion.
Last edited by kiran.karamsetti
on Mon Jan 05, 2009 1:42 pm, edited 1 time in total.