Can't Appent All Records Using SQL design View

M.aliwa

New member
Local time
Today, 08:34
Joined
Oct 31, 2016
Messages
4
Hi Guys
I'm trying to insert date to my table -Created by SQL View

But This Msg Appear on trying to run my Query
And After Pressing Yes,All my data inserted in the table
What 's this Msg refer to ?
 

Attachments

  • Can't Appent All Records.JPG
    Can't Appent All Records.JPG
    87.3 KB · Views: 77
This is normally an issue related to the new record primary key field.

What is the field name and datatype for the PK field?

Please post the query code in SQL view
 
What 's this Msg refer to ?
the message tells you

... didn't add 1 record to the table due to key violations....

key violations are to do with indexing and allowing or not of duplicates
 
CREATE TABLE Students
(
S_Id int NOT NULL PRIMARY KEY,
LastName varChar(50),
FirstTName varChar(50),
Adress varChar(255),
Phone int,
PrintBalance float
)

---------------------------------------
INSERT INTO Students
VALUES (2, 'Aliwa', 'Mahmoud', '15 Uthman Bin Afan St. Matar Al Nozha. Sidi gaber', 093827194, 30.24);
 
The error message occurred because you already have a record with S_ID=2
Possibly you inputted these values twice

Also the phone number cannot be an integer field as it starts with zero
Use a text field for this or your phone number will lose the initial zero

I've never used a float datatype so can't comment on that one or is that just referring to a DOUBLE datatype?

BTW I hope that's not REAL data you've posted for yourself...
 
Last edited:

Users who are viewing this thread

Back
Top Bottom