Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String Contained in Field Name
Message
De
31/10/2001 17:15:48
Charles Richard
Nvo Management Systems
Boisbriand, Québec, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00575887
Message ID:
00575913
Vues:
16
*Create a test cursor
CREATE CURSOR test (memPD C(10), surgPD C(10), FeeKey C(10))
FOR N=1 TO 100
  APPEND BLANK
  REPLACE memPD WITH TRANS(RECNO()) + '1', surgPD WITH TRANS(RECNO()) + '2', FeeKey WITH TRANS(RECNO()) + '3'
ENDFOR

*The actual code needed BROWSE
lcFieldList = myfldlst('PD', 'test')
BROWSE FIELDS &lcfieldList

*OR

*The actual code needed SQL
lcFieldList = myfldlst('PD', 'test')
SELECT &lcFieldList FROM test

*Supporting cast...
PROCEDURE myfldlst
LPARAMETERS lcKey, lcTable
LOCAL laFields, lcFieldList
lcFieldList = ""
DIMENSION laFields(1)
IF AFIELDS(laFields) > 0
  FOR lnFieldno = 1 TO ALEN(laFields, 1)
    IF UPPER(lcKey) $ laFields(lnFieldno, 1)
      lcFieldList = lcFieldList + IIF(EMPTY(lcFieldList), "", ',') + lcTable + '.' + laFields(lnFieldno, 1)
    ENDIF
  ENDFOR
ENDIF
RETURN lcFieldList
>I am trying to come up with a quick, effecient way of issuing a BROWSE... from the command window where I brow fields containing "xx" in their fieldname. For example, I want to browse all the fields in a table that have a "PD" in their fieldname. So I would browse MedPD, SurgPD but not browse FeeKey.
>
>Any suggestions?
Charles Richard
NVO Management Systems
crichard@nvo.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform