Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Query concerning a new table entry

Former Member
0 Kudos

I am making a new entry into table T015Z,I have 4 fields to fill data with,I created one entry without mentioning the primary keys EINH & ZIFF.If I now try to create a new record without mentioning the primary keys,it gives me a message : A data record with specified key fields already exists.

Thus not allowing me to create a new entry.

Is it mandatory to mention all the key fields data while creating a new record? If so,then how will I get the values for the other two key fields,which contain data for Unit & Figure.

Please let me know,what will be the best possible solution for my problem.

Thanks.

4 REPLIES 4

Former Member
0 Kudos

hi Sneha

As I said u earlier, primary key entries are a must to any table as they cannot be NULL.

Now u have to delete the previous entries in the table and again insert new records into the table with Primary key field entries..

this will solve ur problem.

with regards,

Hema Sundara.

pls reward if helpful.

Former Member
0 Kudos

Hi,

Primary Keys are to be entered for inserting or modifying database records. Primary Keys can be used to identify a recored uniquely.

For example you need name/id in a telephone directory to find a number.

The first record you saved was entered with space. ie., a telephone number was saved against the guy 'SPACE'. Now for the second time when you try to create without mentioning Primary Key, an entry 'SPACE' already exists. That is why it is not allowing.

So you can delete the previous entries and give entries with all primary keys specified.

Regards,

Michael.

0 Kudos

The reason why system allowed NULL values for Keys is First time it will take NULL as a Value itself.

when u try to insert 2 record with empty key fields it will consider their value as NULL and throws a ERROR.

Regds,

Suresh

Former Member
0 Kudos

Thanks for all the replies,I have maintained data in the table by mentioning the key fields only.Thanks