Creating a table for errors

I am trying to create a query in access that displays all the errors in my query to update records.  I currently have a query called 'update shelving' that updates the 'shelving date' and 'shelving time' of the table 'shelving' to a table called 'student' where the order numbers are the same...

UPDATE STUDENT INNER JOIN Scanner ON STUDENT.[Order #] = Scanner.[Order #] SET STUDENT.[Shelving Date] = [Scanner].[Shelving Date], STUDENT.[Shelving Time] = [Scanner].[Shelving Time];

How would i write a query that adds data of the order numbers that do not exist in the student table to a separate error table?
NatspapAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

oleggoldCommented:
insert error_table
select * from STUDENT  where STUDENT.[Shelving Date] = [Scanner].[Shelving Date], STUDENT.[Shelving Time] = [Scanner].[Shelving Time];
0
NatspapAuthor Commented:
Im looking to add everything thats in my 'Scanner' table thats not in 'STUDENT' to my error table.  Basically the scanner table tries to reference the student table but if the order number thats in scanner isnt in student then i want it to be added to my error table.
0
NatspapAuthor Commented:
Heres what I have so far but it comes up saying 'Circular reference caused by alias 'order #' in query definition's select list'

INSERT INTO Error_table
SELECT [Order #]
  FROM Scanner
 WHERE [Order #] NOT IN (SELECT [Order #] FROM STUDENT);

Does anyone know whats wrong with this?
0
NatspapAuthor Commented:
I ended up figuring it out.  I changed it to

INSERT INTO Error_table
SELECT *
  FROM Scanner
 WHERE [Order #] NOT IN (SELECT [Order #] FROM STUDENT);
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NatspapAuthor Commented:
I found the answer out on my own.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.