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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Its No good I am justing going to have to ask about STR() 1

Status
Not open for further replies.

rclarke

Technical User
May 14, 2001
78
GB
I am trying to store a numeric value with four decimal places into a string

So here is what I have done

set and input mask on the text box of 9999.9999

and have put the following bit of code ALLTRIM(STR(fValue,4,4))

Why in my table does it reduce the decimal points to at best 1 at worst 0 the values get stored in tst_sdetails which is a string of 50
Apart from that it works fine but I just cannot find why it is reducing the decimal places.

Any ideas would be most appreciated and will result in a pint down my local (White Lion)

Thanks in Advance

Rachel
 
Rachel

lnValue = 9999.9999

? STR(lnValue,9,4)

The first numerical argument in STR() is the total length of the string, the second is the number of decimal points you wish to display.

What time is Happy Hour at the White Lion?

Chris :)
 
Every Hour is happy hour

99p for a pint of theakstons

Guest ales £1.20
Cheap or what.

Fancy a curry after?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top