We use software connected to a database that has certain requirements for records in the table assay, however, our database is larger than just what this software uses and stores all data relating to assays in the table sample.
CREATE TABLE `sample` (
`sample_id` varchar(255) PRIMARY KEY,
`depth_from` real,
`depth_to` real,
`hole_id` varchars,
`bag_id` varchar(255),
`type` varchar(255),
`weight` real,
);
Samples of sample.type 'rock chip' have a sample.depth_from value while samples of sample.type 'crm' do not. The software uses the subset 'rock chip' to display a downhole log. i.e. I need to use a subset of table sample.
SELECT *
FROM sample
WHERE sample.type="rock chip"
;
Too much detail?
Here is the issue; since .accdb was introduced I cannot connect directly to a query, I assume because of the updated data types. The software was originally designed to do this because this is a very common kind of dataset. So, aside from being very annoyed, I am also trying to use derived tables to get around this. But, how do I write back to the original table? With a query, changes and new records would be written to the sample table. I see assay as a temporary thing so changes can't go there. I see problems arising.
Also, the new table query has to be run manually and that is definitely going to be an issue. Users can't be messing with queries.
SELECT * INTO assay
FROM sample
WHERE sample.type="rock chip"
;
How would you go about making a table temporarily and making sure it can be written back to the original table? Is there a way to make this happen automatically?
And in MS Access.