Application Development and Automation 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: 
Read only

insert into db with key primary equals

Former Member
0 Likes
1,714

how do I insert data into a custom database even if the primary keys are the same (from a report).?

how do I insert data into a custom database even if the primary keys are the same (from a report).?

6 REPLIES 6
Read only

ThomasZloch
Active Contributor
1,611

What's a "custom database" ?

Read only

dev_parbutteea
Active Contributor
1,611

A primary key is unique for each record.. it defeats the purpose if you'd like to insert duplicates..

Read only

1,611

Insert help can provide you with correct syntax but you can use command Insert accepting duplicate keys

Read only

1,611

ACCEPTING DUPLICATE KEYS just means that the insert doesn't dump. It does not insert records with duplicate keys.

Read only

former_member1716
Active Contributor
1,611

nick.reyan,

You should not do that, it contradicts the primary key concept completely.

Recommend you to add all those fields that can represent a unique entry when combined as primary key. By this you can both adhere to the table standards and preserve data as well.

Can you explain the business scenario here?

Regards!

Read only

mynynachau
Community Manager
Community Manager
1,611

nick.reyan Please check out this tutorial about asking questions in SAP Community, it helps you and other community members who need help by other community members.

Thanks and best regards

Mynyna ( SAP Community moderator)