Changing values?

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

Guest

I have a table that has several columns with data. One column is job
description and one is "ESTIMATED HOURS PER PIECE". I would like to know how
I can build a query that will single out only the records that have the word
"SEGMENT" somewhere in the description. Then from those records, I would
like to take the "ESTIMATED HOURS PER PIECE" and multipy it by 1.40 to get a
NEW value for the "ESTIMATED HOURS PER PIECE". Therefore, after the query is
run, ONLY the ESTIMATED HOURS PER PIECE for the SEGMENT records will have
changed in value. Everything else will remain the same. Is this possible?
 
Assuming you only want to see the estimated hours and not update them, the
query would look something like:

Select , [Job Description], [ESTIMATED HOURS PER PIECE], [ESTIMATED HOURS
PER PIECE]*1.4 As NewValue
From MyTable
Where [Job Description] Like "*" & "SEGMENT" & "*";
 
Actually I would like to update them. Thanks for your reply.

Arvin Meyer said:
Assuming you only want to see the estimated hours and not update them, the
query would look something like:

Select , [Job Description], [ESTIMATED HOURS PER PIECE], [ESTIMATED HOURS
PER PIECE]*1.4 As NewValue
From MyTable
Where [Job Description] Like "*" & "SEGMENT" & "*";

--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Steve Y said:
I have a table that has several columns with data. One column is job
description and one is "ESTIMATED HOURS PER PIECE". I would like to know
how
I can build a query that will single out only the records that have the
word
"SEGMENT" somewhere in the description. Then from those records, I would
like to take the "ESTIMATED HOURS PER PIECE" and multipy it by 1.40 to get
a
NEW value for the "ESTIMATED HOURS PER PIECE". Therefore, after the query
is
run, ONLY the ESTIMATED HOURS PER PIECE for the SEGMENT records will have
changed in value. Everything else will remain the same. Is this
possible?
 
Steve Y said:
Actually I would like to update them. Thanks for your reply.

Then do something like:

UPDATE MyTable SET [ESTIMATED HOURS PER PIECE] = [ESTIMATED HOURS PER
PIECE]*1.4
WHERE (([Job Description] Like "*" & "SEGMENT" & "*"));

Remember to make sure the field and table names are correct.
 
Back
Top