Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Limitation of Export to Excel of 16K records
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00997770
Message ID:
00997787
Views:
9
Try this. I am not sure if this will speed Your select much but thats way SELECT parser will use RGDSNum TAG to Optimize the first part of WHERE clause.
Select RZSTOP
Set Order To RGDSNum   && RTE_NO + RTE_LET + DIRECTN + STR(SEQNO,4) + STR(NUMBER,3)
Select * From RZStop ;
      where RZStop.SeqNo = 1 ;
      and EMPTY( RZStop.Time) ;
      into CURSOR csrSubjRZStop ;
      Order by Rte_No, Rte_Let, Directn, Number
lnNoRecs		= _TALLY

Select csrSubjRZStop
lnInterval		= INT( lnNoRecs / 100)
If lnInterval < 1
   lnInterval	= 1
EndIf
lnDone			= 0
Thisform.barProgressBar.Reset( lnNoRecs)
Thisform.barProgressBar.Visible = .T.

SCAN
  lcRteNo 	= RTE_NO
  lcDirectn	= DIRECTN
  lcSeqNo  	= STR( SEQNO, 4)
  lcNumber	= STR( NUMBER, 3)
  lcStopNo	= STOP
  lcCounty	= COUNTY

  SYS(3054,12,"sqlTest")
  Select DISTINCT TIME from	RZStop ;
         WHERE RZStop.RTE_NO+RZStop.RTE_LET+RzStop.Directn+STR(SeqNo,4)+STR(Number,3) ==;
               lcRteNo      + "A"          + lcDirectn    + lcSeqNo    + lcNumber;
               and RZStop.Stop   = lcStopNo ;
               and RZStop.County = lcCounty ;
 	       and not EMPTY( RZStop.TIME) ;
    to SCREEN NOCONSOLE	
  SYS(3054,0)
  MessageBox(sqlTest)
  If _TALLY = 0			&& no hits on this stop # - i.e. all Time values empty
       ...
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform