Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: naveed ahmad
  Where is naveed ahmad?
 peshawar
 Pakistan
 naveed ahmad
 To: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 Tags
Subject: RE: how to control chr ' * ' in table
Thread ID: 396046 Message ID: 396162 # Views: 34 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Thursday, January 23, 2014 7:45:11 AM         
   


> > Dear Experts
> > i am facing a problem '*' in table on run time.
> > when i want to make some rate average then comes error like this '*', i mean when i multiply rate/qty if qty = 0 then its makes '*'
> > so how to control because it works stop and message appear that numeric data overflow.
> > please guide me how to solve it.
> > thanks
> > best regards
>
>
> Numeric data overflow plus that * means the result is too big to be stored in your field. You can do the IIF() shown by Tore and Borislav or do an alternative IIF() like this:
>
>
Rate/IIF(qty=0,1,qty)
> 

>
> Or a straightforwards:
>
>
IF qty > 0
>    rate/qty
> ENDIF 

>
> So it won't compute anymore when qty is 0.
>
>
>
>
> https://vfpx.codeplex.com/releases/view/99045
> http://sandstorm36.blogspot.com

thanks to all for reply.
but when i use command 'update set ' then it create some problem it has changed last record with 0.
best regards

ENTIRE THREAD

how to control chr ' * ' in table Posted by naveed ahmad @ 1/22/2014 2:23:29 PM
RE: how to control chr ' * ' in table Posted by Tore Bleken @ 1/22/2014 2:44:00 PM
RE: how to control chr ' * ' in table Posted by Borislav Borissov @ 1/22/2014 4:11:04 PM
RE: how to control chr ' * ' in table Posted by Tore Bleken @ 1/22/2014 4:29:16 PM
RE: how to control chr ' * ' in table Posted by Borislav Borissov @ 1/22/2014 5:10:53 PM
RE: how to control chr ' * ' in table Posted by Jun Tangunan @ 1/23/2014 5:32:21 AM
RE: how to control chr ' * ' in table Posted by naveed ahmad @ 1/23/2014 7:45:11 AM
RE: how to control chr ' * ' in table Posted by Tore Bleken @ 1/23/2014 7:52:11 AM
RE: how to control chr ' * ' in table Posted by naveed ahmad @ 1/23/2014 8:08:13 AM
RE: how to control chr ' * ' in table Posted by Tore Bleken @ 1/23/2014 8:14:53 AM
RE: how to control chr ' * ' in table Posted by naveed ahmad @ 1/23/2014 8:41:55 AM