Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing unique
Message
 
À
27/01/1999 22:49:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00180757
Message ID:
00181326
Vues:
8
>>>>in my example I have a dbf fields office,bpac,method & others where as there are 6 or so different values for office repeatedly. After I set the filter & index and browse, NO RECORDs show! As below
>>>>
>>>>mbpac='691999'
>>>>use e:dbf
>>>>set filt to 'CR_C' $ method .and. mbpac= allt(bpac)
>>>>brow fiel method,bpac,office *ok so far
>>>>inde on office to e:z uniq
>>>>brow fiel method,bpac,office * no records show!
>>>>Sounds crazy?
>>>
>>>Timothy, save yourself a bunch of confusion and just use SQL to get these records.
>>>
>>>SELE dbf
>>>INDEX ON Office TAG Office
>>>SELE * FROM dbf ;
>>>WHERE "CR_C"$method AND mbPac = ALLTRIM(bpac) ;
>>>GROUP BY Office ;
>>>INTO CURSOR Whatever
>>>
>>>BTW, if DBF is really the name of your table, I highly recommend changing it to something that is not a keyword.
>>
>>no, dbf is just my example name. Sounds like a lot more statments are needed using sql eh? Also another file needs to be created to get the job done too. I have not used sql cmds up to this point.
>>-TB
>
>Well, Tim- it's coming up on time for you to learn SQL. You might be surprised at how easy some of the things you try to do are when you use the right tool.

Perhaps I will, the other glitch that wasted alot of my time on this bug was 'set exact on'. Even using alltrim, I had overlooked it!!!!
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform