2007 Mar 02 4:08 AM
Hi everyone,
i created a table with 2 columns( character(1));
i like to have first column unique and also the second column.
First column should accept only the unique entries ,Even the second column
A A
B B
<b>A</b> C . this combination should not be allowed. because A is repeated in column 1.
C <b>B </b>. this shouldnt be allowed as column 2 needs column 2 unique.
Ur help is appreciated
2007 Mar 02 4:55 AM
Hi ,
here u can check at time of entering records in table.U can here a event which checks if the field is uniue through table maintainence generator.
Utilities -> Table Maintainence Generator in that
Environment ->Modifications-> Events
Here u can write code in events which check if its unique..
Reward points if helpful.
2007 Mar 02 4:12 AM
Hi M B,
In the Table You have to mention these two fields should be as a key field then it won't allow to enter the data as you mentioned.
Hope it will help u.
madan.k
2007 Mar 02 4:18 AM
Hi,
I dont think this can be achevied in one TABLE, you might need to break this into two tables and a third table can be created and have a combined key with each field having foriegn key relation with the parents tables. Create one table with one field as KEY and another table as another filed as KEY then create a third table with both the fieldsand then create foriegn key for each field with the parent tables.
Regards,
Sesh
2007 Mar 02 4:18 AM
Hi ,
I think even if you declare the two columns as primary keys your scenarion of having unique keys will work , you can try maintaining such data to test via se16.
Regards,
Sunmit.
2007 Mar 02 4:55 AM
Hi ,
here u can check at time of entering records in table.U can here a event which checks if the field is uniue through table maintainence generator.
Utilities -> Table Maintainence Generator in that
Environment ->Modifications-> Events
Here u can write code in events which check if its unique..
Reward points if helpful.
2007 Mar 02 5:05 AM
Thank u siddhi...
could u pls clearly state the procedure...
The option u mentioned is grayed out.
MB
2007 Mar 02 5:16 AM
Hi MB,
You will have to enter the authorization group, function group (u can create a new function grp ) , maintence type - one step. overview screen (u should write screen number ).
then the events option will be enabled.
Siddhi