Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Elijah ICS
  Where is Elijah ICS?
 Mombasa
 Kenya
 Elijah ICS
 To: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 Tags
Subject: RE: filtering using dble filters..
Thread ID: 104465 Message ID: 104578 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Thursday, August 17, 2006 8:20:17 PM         
   


Prov 15:1,2 reminds us that a soft answer turns away wrath, but a harsh word stirs up anger.
Your type of tongue is told about in verse two.

Sorry for the index issue. I have used the term index to imply the name of the table or the purpose. I should have explained in more fox perhaps, not English!

I have received a few good ideas. Sample the one below:

*Whoops I took another look at your data,
* I see that maybe you need some more steps
* give this a try

SELECT abrev, MIN(lotnosec) AS Min_lot, MAX(lotnosec) AS Max_lot, grdstatus ;
FROM MASTER GROUP BY abrev, grdstatus INTO TABLE temp1

SELECT abrev, PADR(MAX(IIF(grdstatus = 'sec', Min_lot+ " - "+ Max_lot, "")) ,25) AS secrange, ;
PADR(MAX(IIF(grdstatus = 'main', Min_lot+ "-"+ Max_lot, "")),25) AS mainrange, ;
SPACE(250) AS wnames FROM Temp1 into table index GROUP BY ABREV


SELECT DISTINCT abrev, wname FROM MASTER ORDER BY abrev, wname INTO CURSOR temp
SELECT INDEX
GO TOP


SCAN
SELECT INDEX
SELECT temp
SCAN FOR INDEX.abrev = temp.abrev
REPLACE INDEX.wnames WITH ALLTRIM(INDEX.wnames)+ IIF(EMPTY(INDEX.wnames),"",", ") + temp.wname
ENDSCAN
SELECT INDEX
ENDSCAN
BROWSE

use in temp1
ERASE TEMP1.DBF
use in temp

ps- I would like to welcome you to Kenya - a most friendly, lovely country - with no winters and summers like yours! I am at the historical town of Mombasa which houses Fort Jesus and is next to the Indian Ocean. Eccles: 11: 7 - Light is good, and...

> > goingtothetop
> >
> > I have a table, master, from which i need to extract , table index
> >
> > Master
> >
> > Abbre Lotno Grdstatus wname
> >
> > abbre1 lotno1 main wnameI
> > abbre1 lotnox main wnameII
> > abbre1 lotnoy sec wnameIII
> > abbre2 lotnoz main wnameX
> > abbre2 lotnoa sec wnameIX
> >
> > index table required
> >
> > abbre min-max lotno(main) min-max lotno(sec) Wname(s)
> >
> > abbre1 lotno1-lotnox lotnoy - lotnoy wnameI, wnameII, wnameIII
> > abbre2 lotnoz - lotnoz lotnoa - lotnoa wnameX, wname IX
> >
> > Kindly help to work it out. Its been a lovely headache.

>
> I am not sure what you want here. Can you explain with a bit more english? It sounds as if you want to have an index that uses a filter. I don't normally recommend filtering indexes. Rushmore cannot use filtered indexes.
>
> Ken
>
> You shall know the truth - and the truth shall set you free. (John 8:33)




goingtothetop

ENTIRE THREAD

filtering using dble filters.. Posted by Elijah Kihuga @ 8/16/2006 8:22:30 PM
RE: filtering using dble filters.. Posted by Ken Murphy @ 8/16/2006 8:35:43 PM
RE: filtering using dble filters.. Posted by Elijah Kihuga @ 8/17/2006 8:20:17 PM
RE: filtering using dble filters.. Posted by Ken Murphy @ 8/18/2006 1:43:18 PM