Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update prices so the last digit will be 7

Status
Not open for further replies.

way2many

Technical User
Nov 28, 2003
139
US
Hi,
how do I update all prices changing the last digit to 7 or whatever number I want?
Now prices are like this:
$23.54
$53.22
$99.99
--

I just need to update them to:
$23.57
$53.27
$99.97

Thanks
 
How about something on the lines of:

UPDATE Table SET Table.Field = Left([Field],Len([Field])-1)+0.07;
 
UPDATE yourTable
SET [price field] = CCur(Format([price field],"#.#")+0.07)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV
I tried a solution similar to yours before posting. I think you will find that Format rounds.
 




way2many,


I notice that over the past 5 years, you have posted 51 threads and have received many good tips related to your stated needs. Yet, you have responded only ONCE, to
[blue]
Thank Tek-Tip Contributor
for this valuable post!
[/blue].

The Stars accomplish several important things.

First, it gives positive feedback to contributors, that their posts have been helpful.

Second, it identifies threads as containing helpful posts, so that other members can benefit.

And third, it identifies the original poster (that's YOU, BTW), as a grateful member, that not only receives, but is willing to give tokens of thanks.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
SkipVought
That worked, but probably not in the way you expected! :-D
 



way2many,

What valuable post" did I do for you?

The stars are for any contributor that provides a "valuable post" with respect you your thread.

I have requested Tek-Tips Management to remove this little purple star.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top