Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Select Statement
Message
From
13/06/2004 04:45:32
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00912946
Message ID:
00913187
Views:
19

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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform