Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data type mismatch
Message
From
26/08/2004 11:35:11
 
 
To
26/08/2004 10:57:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00936467
Message ID:
00936650
Views:
28
Tore,

I've never seen a problem caused by the multiplication side of this situation. Just did some testing with values, that when multiplied, far exceeded the width of either of the two fields. Used small numbers for the first record, so its result for the first record would be small. VFP handled it just fine.

I just don't see the point in complicating matters by returning a result that is not the correct answer, and then having to adjust those numbers back down somewhere else.

>Better safe than sorry. Since I had no idea about the max value of a.price*a.catchweight, I wanted to be on the safe side. I was sure that Gil understood the picture, and adjusted the multiplicator, if necessary.
>
>>>I tried to change my line, but since I already had received a feedback, I could not update.
>>
>>Sorry about that :)
>>
>>>This was ment to be my second try:
>>>select 1000000.000*iif(a.split_in="Y",a.price*a.catchweight,0)as T
>>
>>Why do you want an answer that is 1000000 times too large, when it is not necessary?
>>
>>>VFP tries to guess the width of the field, and if the first record is 0, then the width will not be big enough.
>>>
>>
>>It not really a "guess"; it uses the width of the first record. "Guess" would imply that we have no control over the situation. No big deal, though.
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform