Adding result from a query to a coloun?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I need to the total sum of emploies i differents companies

Select [company], Sum([employment]) as (not sure what to write here)
FROM [mulitple locations]
Group By [company];

i need to add this result as a colum in my multiple locations table, but how
do i do that?
 
Actually, I don't see why you need to store this information in your table.
Since you can query it anytime, there's really no need. And worse, if the
employment changes, your stored numbers will be wrong.

Generally speaking, you shouldn't store calculated values. There are
exceptions to this, but that's the rule of thumb.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Hi

I can see why it makes sence not storing it in the table, but my table is a
static table, where the values doesnt change which is why i like it in the
same table, as it is a table i spend a lot of time looking in, so it would
make my day easiere if i had it in the same table.

"Roger Carlson" skrev:
Actually, I don't see why you need to store this information in your table.
Since you can query it anytime, there's really no need. And worse, if the
employment changes, your stored numbers will be wrong.

Generally speaking, you shouldn't store calculated values. There are
exceptions to this, but that's the rule of thumb.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Ulto said:
Hi

I need to the total sum of emploies i differents companies

Select [company], Sum([employment]) as (not sure what to write here)
FROM [mulitple locations]
Group By [company];

i need to add this result as a colum in my multiple locations table, but
how
do i do that?
 
Back
Top