G
Guest
I am trying to write a query in Access via SQL that takes two tables, neither
of which has a primary key (and I cannot give a primary key to one of the
tables as it's a thrid party table) and returns the records from PrintJobs1
that do not exist in PrintJobs. I intend on appending this data to PrintJobs,
but first I'm trying to get the select query down and the following seems to
return all the records in PrintJobs1:
SELECT PrintJobs1.Id, PrintJobs1.Copies, PrintJobs1.Printer,
PrintJobs1.Computer, PrintJobs1.Owner, PrintJobs1.Document,
PrintJobs1.SumittedDate, PrintJobs1.SumittedTime, PrintJobs1.TotalPages,
PrintJobs1.Cost, PrintJobs.Id, PrintJobs.Owner
FROM PrintJobs1 LEFT JOIN PrintJobs ON (PrintJobs1.SumittedDate =
PrintJobs.SubmittedDate) AND (PrintJobs1.SumittedTime =
PrintJobs.SubmittedTime) AND (PrintJobs1.Id = PrintJobs.Id) AND
(PrintJobs1.Owner = PrintJobs.Owner)
WHERE (((PrintJobs.Id) Is Null)) OR (((PrintJobs.Owner) Is Null)) OR
(((PrintJobs.SubmittedDate) Is Null)) OR (((PrintJobs.SubmittedTime) Is
Null));
Any help would be greatly appreciated. I want to get through this week with
hair left on my head.
--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003
User of MS Office 2003
of which has a primary key (and I cannot give a primary key to one of the
tables as it's a thrid party table) and returns the records from PrintJobs1
that do not exist in PrintJobs. I intend on appending this data to PrintJobs,
but first I'm trying to get the select query down and the following seems to
return all the records in PrintJobs1:
SELECT PrintJobs1.Id, PrintJobs1.Copies, PrintJobs1.Printer,
PrintJobs1.Computer, PrintJobs1.Owner, PrintJobs1.Document,
PrintJobs1.SumittedDate, PrintJobs1.SumittedTime, PrintJobs1.TotalPages,
PrintJobs1.Cost, PrintJobs.Id, PrintJobs.Owner
FROM PrintJobs1 LEFT JOIN PrintJobs ON (PrintJobs1.SumittedDate =
PrintJobs.SubmittedDate) AND (PrintJobs1.SumittedTime =
PrintJobs.SubmittedTime) AND (PrintJobs1.Id = PrintJobs.Id) AND
(PrintJobs1.Owner = PrintJobs.Owner)
WHERE (((PrintJobs.Id) Is Null)) OR (((PrintJobs.Owner) Is Null)) OR
(((PrintJobs.SubmittedDate) Is Null)) OR (((PrintJobs.SubmittedTime) Is
Null));
Any help would be greatly appreciated. I want to get through this week with
hair left on my head.
--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003
User of MS Office 2003