Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 [solved] Access can't append all records in query

Author  Topic 

mallorz
Starting Member

11 Posts

Posted - 2012-09-09 : 15:50:21
I got a strange error that I don't understand. I am trying to add fields into the table Employee using SQL code. I took a screen shot of the error but I don't really understand this img attachment thing here so here is what it said:

"...Microsoft Access set 1 field to Null value due to a type conversion failure, and it didn't add 0 records to the table due to key violations, 0 records due to lock violations, and 0 records due to validation rule violations.
Do you want to run the action query anyway?
To ignore the errors and run the query, click Yes."

I clicked yes but it did not add the line to the Employee table. Has anyone gotten this error before? My only thought is that in the Employee table, all of the emp_id records are 8 digits long and I am trying to add 3 digit ones. The field size for that particular field is Long Integer. Could that be why?

INSERT INTO Employee (emp_id,
manager_id,
emp_fname,
emp_lname,
dept_id,
street,
city,
state,
zip_code,
phone,
status,
ss_number,
salary,
start_date,
birth_date,
bene_health_ins,
bene_life_ins,
bene_day_care,
sex)
VALUES ('102',
'501',
'Fran',
'Whitney',
'100',
'49 East Washington St',
'Needham',
'MA',
'02192',
'6175553985',
'A',
'388965960',
'45700',
'#8/28/84#',
'#6/5/58#',
'Y',
'Y',
'N',
'F') ;

bitsmed
Aged Yak Warrior

545 Posts

Posted - 2012-09-09 : 17:12:20
Looking at your sample insert statement, it seems that all your fields are strings - they are all quoted.

Try looking into this first.
Go to Top of Page

mallorz
Starting Member

11 Posts

Posted - 2012-09-09 : 17:25:28
quote:
Originally posted by bitsmed

Looking at your sample insert statement, it seems that all your fields are strings - they are all quoted.

Try looking into this first.



You got it. Thanks. I was going off my textbook and they also have the numbers in quotes. I appreciate it very much.
Go to Top of Page
   

- Advertisement -