Data Generator causes foreign key problem

TenGor

Member³
Hy,

if got a problem with the functions
- List(select dname from dept)
- List('1', '2')
- Random(1, 10)

I use it the follwoing way:
I have a Master-Table (TAB_A) and a n-m table (TAB_NM).
The TAB_A has the colums:
ID
MYNAME
The TAB_NM has the colums:
ID
FK_TAB_A
FK_TAB_B

I want to fill the two tables with the following functions of Data Generator:
TAB_A
ID Sequence(2000)
MYNAME 'User_' + Sequence(2000)

TAB_NM
ID Sequence(2000)
FK_TAB_A Master from TAB_A.ID
FK_TAB_B List(Select ID from TAB_B)

In TAB_A i insert 2 records, in TAB_NM i insert 1..3 records.

When i show in the Results i can see, some wrong entries in TAB_NM:

ID |FK_TAB_A |FK_TAB_B
1 |2000 |1
2 |2001 |1
3 |2001 |1
4 |2001 |2

So the Problem is in ID 2, 3. I have an unique Index on the column FK_TAB_A, FK_TAB_B, so if i insert the data i got an error from the index.

Is there a possibility to select "distinct" values for the column FK_TAB_B?
 
Back
Top