Selective Update Queries

bl0u2011

Registered User.
Local time
Today, 11:35
Joined
Dec 23, 2005
Messages
18
Happy New Year Everybody

Can Anyone help me with this please

I have a Employee Table with the following columns
EmpID
Name
Address
Telephone
PostCode
Spending

What I want to do is to update the spending column, for eg. I have the following data in spending
1233
1555
1665

I want to set the last 2 digits of the figure to '00'?
Can anybody tell me how to do this please!! I am desparate for it!

THanks
Si
 
Is Spending a text field? Will it always have four characters? Or is it a number and you want to round it down to the nearest 100?
 
Yes

Yes Spending is a text field
I Just want to update the last two digit to 00 rather than other random number!

Thanks
Si
 
Create a SELECT query with your field and another alongside it with the following Field value NewVal: Left(Spending, Len(Spending)-2) & "00"

Run that to check that the NewValue field looks like you want Spending to look after you update it. Doing this is always a good idea, especially while you're learning.

If so, go back to design view, make it an update query and set Spending to update to the expression in NewVal (everything after the colon).

And run that.
 
Thanks

Thanks it work out well

Cheers
You save my life

Si
 

Users who are viewing this thread

Back
Top Bottom