SQLTeam.com | Weblogs | Forums

Error Message when Trying to Populate Database

sql2014
excel

#1

I'm trying to populate my tables. Yesterday I was able to populate one table. I went to "edit top 200 row" and then I went to my excel file, copied the information, and pasted it onto the database. I realized I wanted to add more data, so I deleted the data I had and now I just keep getting an error message whenever I try to populate the table again:

How do I get rid of this message?

I'm using sql server 2014.


#2

you are inserting a NULL value in the column ISBN.As the error says,that this column doesn't allow NULL,you need to pass a value in this column to get id of this error.


#3

I was able only to add two books and then it stopped putting them. I have a book written by two authors. On the authorid part, can i write: 1,2? I tried doing that, but it says to change the data type. It is varchar?

On the column for new, 1 is supposed to be new book. Else the book is old so 0. I don't know if it is ok what I have for that column.


#4

I have tried to add data to other tables. I'm choosing the whole data I have and it says that the first column is NULL.


#5

you cannot pass 1,2 in the authorid,you need to insert 2 as a new record.


#6

try to add the data row by row


#7

Can you explain more? I did write the book information twice.
One row had author ID be one and then another row with author ID be two, but then the program said they were duplicates...so author ID 2 was deleted.


#8

I tried doing that, but then when I got to the transaction ID, it said there was a conflict with the foreign key in my transaction table.

In the transaction table, transaction ID is the primary key and in the discount table, transaction ID is the foreign key.

I also tried the export/import wizard, but I got error on every row (something about it being a global error) except for the discount column.


#9

Try by selecting one entire row and paste the excel data.