It is kind of strange that you want a field as "Blank". However, you may try:
Update T Set Name = ''
From TableName T
Join
(Select Name, minNumber = Min(Number) from TableName Group By Name) as T1
on T.Name = T1.Name
Where T.Number > T1.minNumber
I found one problem in your sql statement. You should use WHERE instead of HAVING.
strSQL = "SELECT Contact_Table.RESPCODE
FROM Contact_Table
WHERE (((Contact_Table.RESPCODE) Like '" & criteria & "'
GROUP BY Contact_Table.RESPCODE
));"
You may use LEFT JOIN.
Select Customer, Seminar from .... (long from clause involving 4 tables)
LEFT JOIN
(Select Customer, Seminar from ..... (lots of joins, 4 tables, brings back the ones I want to exclude) AS RESULT1
ON TABLEA.CUSTOMER = RESULT1.CUSTOMER AND TABLEA.SEMINAR =...
You should use HAVING instead of WHERE, if you want to use aggregrate values as a condition. Also, HAVING has to be put after GROUP BY.
UPDATE VarFields SET VarFields.PlanYear = 2002
WHERE (((VarFields.InitiativeNo) In (select [VarFields].[InitiativeNo] FROM VarFields
GROUP BY...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.