Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crazy behaviour
Message
From
23/05/2003 06:31:32
 
 
To
22/05/2003 19:58:50
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00792009
Message ID:
00792116
Views:
18
Hi Piet,

you uses variable time function on query with attention.
These are evaluate for any comparison, an for long query these can change.

If you exec query on 23:59:59.50, start data is X,
but data change before query is terminate.

Moreover, it is very slow.

uses variable:

yearNow=YEAR(DATE())
LOCATE FOR iordernr = m.i_ordernr and year(dOrddate)=m.yearNow

can be best:
=LOOKUP(iordernr,m.i_ordernr,iordernr)
yearNow=YEAR(DATE())
LOCATE REST FOR iordernr = m.i_ordernr and year(dOrddate)=m.yearNow

and for long table
=LOOKUP(iordernr,m.i_ordernr,iordernr)
yearNow=str(YEAR(DATE()),4)
s_ordernr=LTRIM(STR(m.i_ordernr))
LOCATE REST FOR iordernr =&s_ordernr and year(dOrddate)=&yearNow

Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform