Update with a twist (1 Viewer)

N

naughtyme

Guest
This query has me all confused. I have been trying to run the query from a module so that I can move through a record set.

I have two tables of data. In Table1 the data is in 10m blocks and is identified by a Section_uid,Start_metres,End_metres,cracking

Table2 has the same column headings (except the cracking column), but is in 100m blocks.

I want to update the cracking_100m column in Table2 with the sum of cracking from Table1 between each of the 100m blocks.

An example follows minus the vb code

Update cracking_100m as a inner join cracking as b on (a.section_uid=b.section_uid)
SET a.cracking_total=sum(b.cracking)
where b.start_metres between a.start_metres and a.end_metres

Any help would be more than appreciated...I'll do a massage if it helps!

[This message has been edited by naughtyme (edited 07-18-2001).]
 
R

Rich

Guest
Well it'll be a shame not to get a massage (or was it a misprint)but the general concensus is not to store calculated values in a table, use a query or put the calculation on a form.
HTH
 
N

naughtyme

Guest
The massage was not a misprint...but as I'm a heterosexual male...no funny stuff ok!?

Thanks for your help Rich. It wasn't long after posting the message that I wrote a simplish query to do the job.

Thanks for replying anyway!
 
R

Rich

Guest
I just knew it was going to be a message




[This message has been edited by Rich (edited 07-18-2001).]
 

Users who are viewing this thread

Top Bottom