Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with Select Statement
Message
De
13/06/2004 04:45:32
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00912946
Message ID:
00913187
Vues:
18

I already had a salesman number, so that was not an issue.

I really appreciate this, the code worked perfectly.

Mel Cummings

If you add this index ( ALSO TEMPORARY BEFORE EXECUTING THE SELECT ) to child table:
SELECT Child
INDEX ON BINTOC(id_field)+CHR(selesManNum) TAG primTag && this is a candidate index for Child table 
or
INDEX ON BINTOC(id_field)+CHR(selesManNum) TO sys(2023)+'\primTag' && this is best for temporary index
you can rewrite this select with the best efficient code possible:
SELECT	parent.id_field				;
,	parent.FirstName	;
,	parent.LastName 	;
,	parent.Address	;
,	parent.city 	;
,	parent.State	;
,	parent.zip 	 ;
,	LOOKUP(child.FirstName,BINTOC(id_field)+CHR(1),child.id_field,"primTag")FirstName1	;
,	LOOKUP(child.LastName,BINTOC(id_field)+CHR(1),child.id_field,"primTag")	LastName1	;
,	LOOKUP(child.FirstName,BINTOC(id_field)+CHR(2),child.id_field,"primTag")FirstName2	;
,	LOOKUP(child.LastName,BINTOC(id_field)+CHR(2),child.id_field,"primTag")LastName2	;
...
,	LOOKUP(child.FirstName,BINTOC(id_field)+CHR(20),child.id_field,"primTag")	FirstName20	;
,	LOOKUP(child.LastName,BINTOC(id_field)+CHR(20),child.id_field,"primTag")	LastName20	;
FROM parent 
This run into 1 or 2 ms

Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform