J
JonWayn
can somebody help me out with an SQL statement that will update the [Status]
field to 1 for the FIRST [Defendant] of each (duplicate) group, sorted on
the [Priority] field?
In other words, I have a table with fields Defendant, Status, Priority, and
others. Every [Defendant] is duplicated a random amount of times. After
sorting on the [Priority] field (in ascending) order, I'd like to select
only the first record of each defendant group to update the [Status] field
of that record to the value 1. How do I word such an SQL statement? I tried
using the FIRST predigate but I ended up selecting only a single record no
matter how many duplicate groups exist in the table.
Thank you
field to 1 for the FIRST [Defendant] of each (duplicate) group, sorted on
the [Priority] field?
In other words, I have a table with fields Defendant, Status, Priority, and
others. Every [Defendant] is duplicated a random amount of times. After
sorting on the [Priority] field (in ascending) order, I'd like to select
only the first record of each defendant group to update the [Status] field
of that record to the value 1. How do I word such an SQL statement? I tried
using the FIRST predigate but I ended up selecting only a single record no
matter how many duplicate groups exist in the table.
Thank you