Index
2010-03-18 15:57 – Sytze de Boer : VFP9 - Speed
2010-03-18 16:07 – Jarvis, Matthew : RE: VFP9 - Speed
2010-03-18 16:15 – Richard Quilhot : Re: VFP9 - Speed
2010-03-18 16:16 – Jarvis, Matthew : RE: VFP9 - Speed
2010-03-18 16:19 – Stephen Russell : Re: VFP9 - Speed
2010-03-18 16:22 – Kevin Cully : Re: VFP9 - Speed
2010-03-18 16:36 – Tracy Pearson : RE: VFP9 - Speed
2010-03-18 17:37 – Alan Bourke : Re: VFP9 - Speed
2010-03-18 17:39 – Alan Bourke : Re: VFP9 - Speed
2010-03-19 05:09 – Alan Bourke : Re: VFP9 - Speed
Back to top
VFP9 - Speed

Author: Sytze de Boer

Posted: 2010-03-18 15:57:51   Link

What's the quickest way

*There's an indexed table

1

Sele winhst

seek myclient

if found()

scan while client=myclient

lastinvoicedate=date

endscan

endif

2

select client,date from winhst where client=myclient into cursor temp

if !eof()

go bott

lastinvoicedate=date

endif

--

Regards

Sytze de Boer

Kiss Systems

Hamilton, NZ

Ph: 64-7-8391670, Mob:64 21 937611

URL: www.kiss.co.nz

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/367498c41003181257g2ec08989kf344e9aa9d2ff753@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Sytze de Boer
Back to top
RE: VFP9 - Speed

Author: Jarvis, Matthew

Posted: 2010-03-18 16:07:28   Link

> -----Original Message-----

> From: profoxtech-bounces@leafe.com

[mailto:profoxtech-bounces@leafe.com]

> On Behalf Of Sytze de Boer

> Sent: Thursday, March 18, 2010 12:58 PM

> To: profoxtech@leafe.com

> Subject: VFP9 - Speed

>

> What's the quickest way

>

> *There's an indexed table

> 1

> Sele winhst

> seek myclient

> if found()

> scan while client=myclient

> lastinvoicedate=date

> endscan

> endif

>

> 2

> select client,date from winhst where client=myclient into cursor temp

> if !eof()

> go bott

> lastinvoicedate=date

> endif

>

The answer is: It Depends...

Can you try them both and see?

Also bear in mind that over time as the data gets bigger, the answer

could change...

Thanks,

Matthew Jarvis || Business Systems Analyst

IT Department

McKenzie-Willamette Medical Center

1460 G Street, Springfield, OR 97477 || Ph: 541-744-6092 || Fax:

541-744-6145

--------------------------------------------------------------------------

Disclaimer: This electronic message may contain information that is

Proprietary, Confidential, or legally privileged or protected. It

is intended only for the use of the individual(s) and entity named

in the message. If you are not an intended recipient of this

message, please notify the sender immediately and delete the

material from your computer. Do not deliver, distribute or copy

this message and do not disclose its contents or take any action in

reliance on the information it contains.

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/69F310C05DD83C48A84BA3769CE1ECF802F6E98E@TNTRIEXEVS02.triadhospitals.net

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Jarvis, Matthew
Back to top
Re: VFP9 - Speed

Author: Richard Quilhot

Posted: 2010-03-18 16:15:25   Link

If the values you are seeking are indexed, checkout the indexseek()

function.

Richard E. Quilhot C.N.A.

quilhotr@gmail.com

On Thu, Mar 18, 2010 at 3:57 PM, Sytze de Boer <sytze.kiss@gmail.com> wrote:

> What's the quickest way

>

> *There's an indexed table

> 1

> Sele winhst

> seek myclient

> if found()

> scan while client=myclient

> lastinvoicedate=date

> endscan

> endif

>

> 2

> select client,date from winhst where client=myclient into cursor temp

> if !eof()

> go bott

> lastinvoicedate=date

> endif

>

>

>

>

>

>

> --

> Regards

> Sytze de Boer

> Kiss Systems

> Hamilton, NZ

> Ph: 64-7-8391670, Mob:64 21 937611

> URL: www.kiss.co.nz

>

>

> --- StripMime Report -- processed MIME parts ---

> multipart/alternative

> text/plain (text body -- kept)

> text/html

> ---

>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/bfe30b7d1003181315y2495a5f0t74b44439cca82663@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Richard Quilhot
Back to top
RE: VFP9 - Speed

Author: Jarvis, Matthew

Posted: 2010-03-18 16:16:21   Link

> -----Original Message-----

> From: profoxtech-bounces@leafe.com

[mailto:profoxtech-bounces@leafe.com]

> On Behalf Of Sytze de Boer

> Sent: Thursday, March 18, 2010 12:58 PM

> To: profoxtech@leafe.com

> Subject: VFP9 - Speed

>

> What's the quickest way

>

> *There's an indexed table

> 1

> Sele winhst

> seek myclient

> if found()

> scan while client=myclient

> lastinvoicedate=date

> endscan

> endif

>

> 2

> select client,date from winhst where client=myclient into cursor temp

> if !eof()

> go bott

> lastinvoicedate=date

> endif

Another way to try this is (winging it):

Select max( date) from winhst where client=myclient

Or something like that...

Thanks,

Matthew Jarvis || Business Systems Analyst

IT Department

McKenzie-Willamette Medical Center

1460 G Street, Springfield, OR 97477 || Ph: 541-744-6092 || Fax:

541-744-6145

--------------------------------------------------------------------------

Disclaimer: This electronic message may contain information that is

Proprietary, Confidential, or legally privileged or protected. It

is intended only for the use of the individual(s) and entity named

in the message. If you are not an intended recipient of this

message, please notify the sender immediately and delete the

material from your computer. Do not deliver, distribute or copy

this message and do not disclose its contents or take any action in

reliance on the information it contains.

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/69F310C05DD83C48A84BA3769CE1ECF802F6E99D@TNTRIEXEVS02.triadhospitals.net

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Jarvis, Matthew
Back to top
Re: VFP9 - Speed

Author: Stephen Russell

Posted: 2010-03-18 16:19:31   Link

On Thu, Mar 18, 2010 at 2:57 PM, Sytze de Boer <sytze.kiss@gmail.com> wrote:

> What's the quickest way

>

> *There's an indexed table

> 1

> Sele winhst

> seek myclient

> if found()

>

©2010 Stephen Russell
Back to top
Re: VFP9 - Speed

Author: Kevin Cully

Posted: 2010-03-18 16:22:34   Link

3. I'm not sure if this is fastest but this would be my preferred solution

select client, max(date) as lastinvoicedate ;

from winhst ;

where client=myclient ;

group by client ;

order by client ;

into cursor temp

? temp.LastInvoiceDate

Sytze de Boer wrote:

> What's the quickest way

>

> *There's an indexed table

> 1

> Sele winhst

> seek myclient

> if found()

> scan while client=myclient

> lastinvoicedate=date

> endscan

> endif

>

> 2

> select client,date from winhst where client=myclient into cursor temp

> if !eof()

> go bott

> lastinvoicedate=date

> endif

>

>

>

>

>

>

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/4BA28B8A.3060702@cullytechnologies.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Kevin Cully
Back to top
RE: VFP9 - Speed

Author: Tracy Pearson

Posted: 2010-03-18 16:36:01   Link

That needs the Group By 1 (or group by client) on it too.

-----Original Message-----

From: Stephen Russell

Sent: Thursday, March 18, 2010 4:20 PM

On Thu, Mar 18, 2010 at 2:57 PM, Sytze de Boer wrote:

> What's the quickest way

>

> *There's an indexed table

> 1

> Sele winhst

> seek myclient

> if found()

>

©2010 Tracy Pearson
Back to top
Re: VFP9 - Speed

Author: Alan Bourke

Posted: 2010-03-18 17:37:59   Link

Select top 1 lastinvoicedate from winhst order by lastinvoicedate desc

into array laDummy

lastinvoicedate = laDummy[1, 1]

--

Alan Bourke

alanpbourke (at) fastmail (dot) fm

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/1268948279.27952.1365565879@webmail.messagingengine.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Alan Bourke
Back to top
Re: VFP9 - Speed

Author: Alan Bourke

Posted: 2010-03-18 17:39:01   Link

Sorry you'd need to add a where clause to that SQL statement too:

where client = myclient

--

Alan Bourke

alanpbourke (at) fastmail (dot) fm

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/1268948341.28069.1365566065@webmail.messagingengine.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Alan Bourke
Back to top
Re: VFP9 - Speed

Author: Alan Bourke

Posted: 2010-03-19 05:09:33   Link

On further reflection:

Select top 1 lastinvoicedate from winhst where client = myclient order

by client, invoicedate desc group by client, invoicedate into array

laResult

lastinvoicdate = laResult[1, 1]

--

Alan Bourke

alanpbourke (at) fastmail (dot) fm

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/1268989773.23870.1365637579@webmail.messagingengine.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Alan Bourke