update query help

bigmac

Registered User.
Local time
Today, 01:28
Joined
Oct 5, 2008
Messages
302
hello all can you help please i need an update query that when run shows the following columns id , stat, date, update,
what i am trying to achieve s when the query is run the stat column can contain either "positive" or "negative" i want to be able to change the update column to "accept" but only if ALL the stat fields in the query contain "positive".
if they contain some "positive" and "negative" then i want the query not to update the update column. can this be done and if so can you show me please:confused:
 
hello all can you help please i need an update query that when run shows the following columns id , stat, date, update,

Update queries don't show results. Maybe you are thinking about a select query

SELECT id , stat, date, update FROM [the table name]

what i am trying to achieve s when the query is run the stat column can contain either "positive" or "negative" i want to be able to change the update column to "accept" but only if ALL the stat fields in the query contain "positive".
if they contain some "positive" and "negative" then i want the query not to update the update column. can this be done and if so can you show me please:confused:

That could be an update query something like:

Code:
UPDATE [the table name] SET [the table name].[update] = "accept"
WHERE (((DCount("*","[the table name]","[stat]= 'positive'")>0)=True));

But this makes me wonder if the field "update" belongs in the same table. Also date is a bad choice for a field name as it is a reserved word.
 

Users who are viewing this thread

Back
Top Bottom