Update Query

ielamrani

Registered User.
Local time
Today, 10:52
Joined
May 6, 2008
Messages
51
Hi,
Can anyone tell me why this is not updating the table?

UPDATE FMPSL SET MODE_PREM = ([2010]/12)
WHERE (((DatePart("m",(DateAdd("m",1,Date()))))=DatePart("m",[FMPSL].[REG_DATE])) AND (([MODE])="M"));
Thanks.
 
First up -

What datatype is MODE_PREM?

If text and you want the actual thing in brackets [2010]/12 like that then you would nee quotes:

"[2010]/12"
 
Thanks for the quick reply.
It's not a text it a number.
 
So you are wanting the value of

2010/12

inserted which equals 167.5 (so 167.5 inserted?)

If not then what is it you really want from that number? You can't put brackets around part of it as it then does not become a number. You can't have the / slash because it is not a number but is an operator.
 
This sounds confusing but 2010 is a name of a column that contains a number. The formula is trying to divide the number in 2010 column by 12.

I did not create this I was only asked to fix it.
 

Users who are viewing this thread

Back
Top Bottom