PAULCALLAGHAN
Technical User
Access 2000
I have created two append queries to the same master table.
The first query appends for actual labour records to the master table.
The second query is suppose to append for standard labour records of these actual labour records in this master table.
I can not create a single append query because of the structure of the labour records. Trust me on this one, unless someone is up for a real challenge.
The primary keys in both is the combination of shop order number and operation sequence. This is unique, trust me.
The master table has shop order num, oper seq, std runtime, actual runtime, et al. The first append query simply puts values in all the proper fields of the master table except the 'standard' value fields, these have zeroes.
Conversely I want the second append query to simply check if the record exists - shop order num and oper seq combination - then insert the amount into the standard value field of the master table. That's all.
If the record does not exist already then insert everything except an actual value, that is zeroes for the actual fields.
Can someone please help me to write the SQL for this second query?
I have created two append queries to the same master table.
The first query appends for actual labour records to the master table.
The second query is suppose to append for standard labour records of these actual labour records in this master table.
I can not create a single append query because of the structure of the labour records. Trust me on this one, unless someone is up for a real challenge.
The primary keys in both is the combination of shop order number and operation sequence. This is unique, trust me.
The master table has shop order num, oper seq, std runtime, actual runtime, et al. The first append query simply puts values in all the proper fields of the master table except the 'standard' value fields, these have zeroes.
Conversely I want the second append query to simply check if the record exists - shop order num and oper seq combination - then insert the amount into the standard value field of the master table. That's all.
If the record does not exist already then insert everything except an actual value, that is zeroes for the actual fields.
Can someone please help me to write the SQL for this second query?