Index
2012-07-10 08:57Gérard Lochon : Re: Months later ... i have an SQL soluce for "what is the rank ofthis data in an index order?"
2012-07-10 09:14Gérard Lochon : Re: Months later ... i have an SQL soluce for "what is the rank ofthis data in an index order?"
2012-07-10 10:45Allen : RE: Months later ... i have an SQL soluce for "what is the rank ofthis data in an index order?"
2012-07-10 13:25Gérard Lochon : Re: Months later ... i have an SQL soluce for "what is the rank ofthis data in an index order?"
2012-07-10 14:27Stephen Russell : Re: Months later ... i have an SQL soluce for "what is the rank ofthis data in an index order?"
Back to top
Re: Months later ... i have an SQL soluce for "what is the rank ofthis data in an index order?"

Author: Gérard Lochon

Posted: 2012-07-10 08:57:21   Link

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

>From: "Jean MAURICE" <jsm.maurice@wanadoo.fr>

>To: <profox@leafe.com>

>Sent: Tuesday, July 10, 2012 3:25 PM

>Subject: Re: Months later ... i have an SQL soluce for "what is the rank

>ofthis data in an index order?"

>

>oh my god !!

>

><Je n'aurais JAMAIS imaginé imbriquer des SELECT dans la clause FROM !!!!

>

>I would never dare use a SELECT in a FROM clause of a SELECT statement

>being

>itself in a FROM clause of a 'upper' SELECT !!!

>

>The Foxil

>

>Jean à Grenoble

>

YES you knew it Jean !

(even if you can't remind it)

In a previous thread within our french newsgroup,

there was a question about filtering a bottom of top of bottom

lot of records, to get the number 'n' within a scalable data lot,

and i told you about imbricating SELECTs FROM clause

three times deep to reach out the result !

Tha't the same way i did it ; when you choose your prime

subset, at first file level asking, you can then bind a recno()

to a field, so it will fit correctly while upsourced to the prior

request. A way to get rid of recno()'s sql ghosts ...

After, it is more than the way it takes to raise the sauce ...

:o)))

Gérard.

_______________________________________________

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/80142FC0B06A441CAD3862A9993594FD@MuriellePC

** 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.

©2012 Gérard Lochon
Back to top
Re: Months later ... i have an SQL soluce for "what is the rank ofthis data in an index order?"

Author: Gérard Lochon

Posted: 2012-07-10 09:14:56   Link

>

> Is there any value to know the location # from BOF(), and if there is

> why is closer better depending on index?

Grmbl grmbl grmbl ...

Let me put my fingers out of my *not so soft* holidays' best drink,

(pastis 51), and i'll next find out a *f**ing* solution, if my *suck...g*

wife don't make a database crash using my private profile.

Waa waa, how could i rest for a while beeing happy,

while you're sucker filling me with pain (sur la planche) ?

;o)

Gérard.

PS : the less you give, the more they ask.

_______________________________________________

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/9629AEBD006244CAA8F8D9866BBB23A5@MuriellePC

** 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.

©2012 Gérard Lochon
Back to top
RE: Months later ... i have an SQL soluce for "what is the rank ofthis data in an index order?"

Author: Allen

Posted: 2012-07-10 10:45:13   Link

I would stick with the Pastis :) or start the cab sav

Al

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

Grmbl grmbl grmbl ...

Let me put my fingers out of my *not so soft* holidays' best drink, (pastis

51), and i'll next find out a *f**ing* solution, if my *suck...g* wife don't

make a database crash using my private profile.

Waa waa, how could i rest for a while beeing happy, while you're sucker

filling me with pain (sur la planche) ?

_______________________________________________

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/003701cd5eb2$ff24bdc0$fd6e3940$@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.

©2012 Allen
Back to top
Re: Months later ... i have an SQL soluce for "what is the rank ofthis data in an index order?"

Author: Gérard Lochon

Posted: 2012-07-10 13:25:32   Link

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

>

> Is there any value to know the location # from BOF(), and if there is

> why is closer better depending on index?

BOF() is an XBase iterative function, nothing to do witrh SQL ensembly

conceipt.

Somewhere, excluding it.

However; it is always possible to replace this lack of logic.

If we consider the previous example :

[VFP]

CREATE CURSOR test ;

(lib c(10),mt i)

INSERT INTO test VALUES ("john",10)

INSERT INTO test VALUES ("jennifer",15)

INSERT INTO test VALUES ("stella",25)

INSERT INTO test VALUES ("sophia",40)

INSERT INTO test VALUES ("greg",50)

INSERT INTO test VALUES ("jeff",20)

[/VFP]

It is possible to "create a rank" according to a choosen order.

Let's do it. We choose to order "mt" values :

[VFP]

SELECT xx.lib, xx.mt, COUNT(yy.mt) as rank ;

FROM test xx, test yy ;

WHERE xx.mt <= yy.mt ;

GROUP BY xx.lib, xx.mt ;

ORDER BY xx.mt DESC, xx.lib DESC

[/VFP]

Once upon this order is made, we can determine

a numeric distance delta (your question) from

BOF() or EOF().

The final request beeing trivial,

i would't offense your professional side

by giving you tricks on me.

Gérard.

_______________________________________________

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/319F4887E914446C8F14B49241435148@MuriellePC

** 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.

©2012 Gérard Lochon
Back to top
Re: Months later ... i have an SQL soluce for "what is the rank ofthis data in an index order?"

Author: Stephen Russell

Posted: 2012-07-10 14:27:28   Link

On Tue, Jul 10, 2012 at 1:25 PM, Gérard Lochon <g-lochon@wanadoo.fr> wrote:

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

>

>>

>> Is there any value to know the location # from BOF(), and if there is

>> why is closer better depending on index?

>

> BOF() is an XBase iterative function, nothing to do witrh SQL ensembly

> conceipt.

> Somewhere, excluding it.

>

> However; it is always possible to replace this lack of logic.

>

> If we consider the previous example :

>

> [VFP]

>

> CREATE CURSOR test ;

> (lib c(10),mt i)

>

> INSERT INTO test VALUES ("john",10)

> INSERT INTO test VALUES ("jennifer",15)

> INSERT INTO test VALUES ("stella",25)

> INSERT INTO test VALUES ("sophia",40)

> INSERT INTO test VALUES ("greg",50)

> INSERT INTO test VALUES ("jeff",20)

>

> [/VFP]

>

> It is possible to "create a rank" according to a choosen order.

>

> Let's do it. We choose to order "mt" values :

>

>

> [VFP]

>

> SELECT xx.lib, xx.mt, COUNT(yy.mt) as rank ;

> FROM test xx, test yy ;

> WHERE xx.mt <= yy.mt ;

> GROUP BY xx.lib, xx.mt ;

> ORDER BY xx.mt DESC, xx.lib DESC

>

> [/VFP]

>

> Once upon this order is made, we can determine

> a numeric distance delta (your question) from

> BOF() or EOF().

>

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

Does this handle the tie at the #2 rank properly for ranks 3,4&5?

--

Stephen Russell

Sr. Analyst

Ring Container Technology

Oakland TN

901.246-0159 cell

_______________________________________________

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/CAJidMYLmsAs9Gue_C4pXozRBvUh2HLihboAN-ZqOY1NdvyqCOw@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.

©2012 Stephen Russell