J
JC
Hello,
I am trying to change a select, find duplicates, query into a delete
query. I want to get rid of the records in the main table
"tblHurnsHistory." I changed the Find Duplicates query to a Delete
query. I then received an input box looking for criteria that
states,"
Enter parameter value
qryHurnsHistory.Grads_creditsEarned
Then it deletes 0 records. I need it to delete the 48 that the Find
Duplicates query returned.
I am a little rusty at SQL, can you help me so the following SQL
deletes the records returned by the FindDuplicates query.
DELETE HHDelete.SyStudentID, HHDelete.Grads_creditsEarned, HHDelete.ID,
HHDelete.StudentName, HHDelete.SSN, HHDelete.adTrmCode,
HHDelete.GPA_creditsEarned, HHDelete.StatusDesc, HHDelete.StatusDate,
HHDelete.LDA, HHDelete.ProgVersCode, HHDelete.TermCode,
HHDelete.term_credits, HHDelete.TotalCrd, HHDelete.creditsAttempt,
HHDelete.GPA, HHDelete.CreditsRemaining, HHDelete.SumOfReceived,
HHDelete.SumOfRefunded, HHDelete.FundSource
FROM tblHurnsHistory AS HHDelete
WHERE (((HHDelete.SyStudentID) In (SELECT [SyStudentID] FROM
[qryHurnsHistory] As Tmp GROUP BY [SyStudentID],[Grads_creditsEarned]
HAVING Count(*)>1 And [Grads_creditsEarned] =
[qryHurnsHistory].[Grads_creditsEarned])));
Thanks in advance,
Justin
I am trying to change a select, find duplicates, query into a delete
query. I want to get rid of the records in the main table
"tblHurnsHistory." I changed the Find Duplicates query to a Delete
query. I then received an input box looking for criteria that
states,"
Enter parameter value
qryHurnsHistory.Grads_creditsEarned
Then it deletes 0 records. I need it to delete the 48 that the Find
Duplicates query returned.
I am a little rusty at SQL, can you help me so the following SQL
deletes the records returned by the FindDuplicates query.
DELETE HHDelete.SyStudentID, HHDelete.Grads_creditsEarned, HHDelete.ID,
HHDelete.StudentName, HHDelete.SSN, HHDelete.adTrmCode,
HHDelete.GPA_creditsEarned, HHDelete.StatusDesc, HHDelete.StatusDate,
HHDelete.LDA, HHDelete.ProgVersCode, HHDelete.TermCode,
HHDelete.term_credits, HHDelete.TotalCrd, HHDelete.creditsAttempt,
HHDelete.GPA, HHDelete.CreditsRemaining, HHDelete.SumOfReceived,
HHDelete.SumOfRefunded, HHDelete.FundSource
FROM tblHurnsHistory AS HHDelete
WHERE (((HHDelete.SyStudentID) In (SELECT [SyStudentID] FROM
[qryHurnsHistory] As Tmp GROUP BY [SyStudentID],[Grads_creditsEarned]
HAVING Count(*)>1 And [Grads_creditsEarned] =
[qryHurnsHistory].[Grads_creditsEarned])));
Thanks in advance,
Justin