H
Hanif Merali
Hello I'm having some trouble writing an update query that updates a
certain field in a table based on 2 criteria. The Table has 3 fields
that I'm going to be using a CUSTOMERNUM field a ADD1 field and a DNP
field. I want to update the DNP field to equal 9 if ADD1 is
duplicated but I only wanna update the DNP field for all of the
duplicates but 1 based on the customer number.
An example of this would be:
CUSNUM ADD1 DNP
2 22 Hunting
1 22 Hunting
5 22 Hunting
I'd want the table to look like this after running the query
CUSNUM ADD1 DNP
2 22 Hunting 9
1 22 Hunting 9
5 22 Hunting
I want the GREATEST CUSNUM value to not be updated but all other
cusnum values that had duplicate ADD1 field to be updated to DNP=9.
This seems pretty confusing but I hope you understand what I am trying
to accomplish. Thanks in advance for your help!
Sincerly,
Hanif Merali
certain field in a table based on 2 criteria. The Table has 3 fields
that I'm going to be using a CUSTOMERNUM field a ADD1 field and a DNP
field. I want to update the DNP field to equal 9 if ADD1 is
duplicated but I only wanna update the DNP field for all of the
duplicates but 1 based on the customer number.
An example of this would be:
CUSNUM ADD1 DNP
2 22 Hunting
1 22 Hunting
5 22 Hunting
I'd want the table to look like this after running the query
CUSNUM ADD1 DNP
2 22 Hunting 9
1 22 Hunting 9
5 22 Hunting
I want the GREATEST CUSNUM value to not be updated but all other
cusnum values that had duplicate ADD1 field to be updated to DNP=9.
This seems pretty confusing but I hope you understand what I am trying
to accomplish. Thanks in advance for your help!
Sincerly,
Hanif Merali