I'm almost done with this, just a few last hiccups. I now need to delete all records from a table except for the top 1 where readings_miu_id is the "DISTINCT" column. In other words words i need to delete all records from a table other than the first DISTINCT readings_miu_id. I am assuming all i need to do is modify the basic delete statement:
DELETE FROM analyzedCopy2
WHERE readings_miu_id = some_value
but i cant figure out how to change the some_column=some_value part to something like:
where some_column notequal to (select top 1 from analyzedCopy2 as A
where analyzedCopy2.readings_miu_id = A.readings_miu_id)
and then i need to figure out how to use an UPDATE statement to update a table (analyzedCopy2) from a query (which is where all of the values i want stored into column RSSI in table analyzedCopy2 are currently located). I've tried this:
UPDATE analyzedCopy2 from testQuery3 SET analyzedCopy2.RSSI =
(select AvgOfRSSI from testQuery3 INNER JOIN analyzedCopy2 on analyzedCopy2.readings_miu_id = testQuery3.readings_miu_id where analyzedCopy2.readings_miu_id = testQuery3.readings_miu_id)
where analyzedCopy2.readings_miu_id = testQuery3.readings_miu_id
but apparantly i cant use FROM inside of an update statement. Any thoughts?
I'm sure i'm going about this a very nonstandard (and possibly if not probably the flat out wrong) way but im not being allowed to use vb.net2008 to pull and manipulate then store the data like i would like to so i'm stuck right now using sql statements in ms-access which is a good learning experience (Even if trying to do such odd things as i've been having to do in sql statements is making me beat my head against my deck figuratively of course)