I'm fairly new at Access and need a little bit of help. I'm using Access 97 to do an update query, SQL is below:
UPDATE (FileNames INNER JOIN Final ON FileNames.Company = Final.company) INNER JOIN OutputTable_by_field ON Final.Cusip = OutputTable_by_field.Field2 SET OutputTable_by_field.Field10 = [Field10]-[Final]![Total], OutputTable_by_field.Field15 = [Field15]-[Final]![Total], OutputTable_by_field.Field17 = [Field17]+[Final]![Total], OutputTable_by_field.Field16 = [Field16]-[Final]![Total]
WHERE (((Final.[Aloc Status Type Code])=4));
It's a pretty basic update as I'm just adding/subtracting certain fields. However, Field2 in my OutputTable may have more than one occurence of the same value. I cannot uniquely identify the records in the OutputTable other than using an autoid. So, how can I update only the first occurence of a specific value for Field2? Thanks in advance. Chris
UPDATE (FileNames INNER JOIN Final ON FileNames.Company = Final.company) INNER JOIN OutputTable_by_field ON Final.Cusip = OutputTable_by_field.Field2 SET OutputTable_by_field.Field10 = [Field10]-[Final]![Total], OutputTable_by_field.Field15 = [Field15]-[Final]![Total], OutputTable_by_field.Field17 = [Field17]+[Final]![Total], OutputTable_by_field.Field16 = [Field16]-[Final]![Total]
WHERE (((Final.[Aloc Status Type Code])=4));
It's a pretty basic update as I'm just adding/subtracting certain fields. However, Field2 in my OutputTable may have more than one occurence of the same value. I cannot uniquely identify the records in the OutputTable other than using an autoid. So, how can I update only the first occurence of a specific value for Field2? Thanks in advance. Chris