Once a month I get an xml file with customers billings for the last month. I need to store this information in a database. I have a table named transactions. My primary key is the customers_nr. Currently when I’m inserting data, I’m getting error
violoation to primary key……
I’m using a table adapter for inserting. Basically I only need to keep filling the database with information. So is there any command for handling this? Or how should I do
Example of informaton
customer_nr: 12345
Billing_name: Microsoft
Billing_city: Seattle
Billing_amount 300
Billing_name: Mcdonalds
Billing_city: Seattle
Billing_amount 25
customer_nr: 4321
Billing_name: Ikea
Billing_city: New York
Billing_amount 1200
billing datetime i more suitable for the primary key in this relation, alt. customer_nr + billing_datetime.
If you don’t have any date and time for billing, or just know the month, you could use customer_nr, year, month as a composite primary key.