Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find all tables with a field
Message
 
À
10/03/2004 12:59:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00884904
Message ID:
00884918
Vues:
13
Someting like this:
*VFP 8 and below
creaTE CURS IREPO (tablename c(25), field_Name c(25), flag L)
sele 0
1. Collect all table names with adir(aa)
2. for ia =1 to alen(aa,1)
    use (aa[ia,1])
    release afld
    =afield(afld)
    m.flag=ascan(afld,"FIELD_NAME_YOU_ARE_LOOKING_FOR")>0
    for ib=1 to alen(afld,1)
         insert into irepo values (aa[ia,1],afld[ib,1],m.flag)
    endif
  endfor
  index on tablename+field_name tag hello
>VFP 7 (8 latter)
>
>I am updating an application and I need to be sure I added a field to all the tables that need it. Is there a simple way to get a list of:
>
>1. all tables that contain a field.
>
>2. a list of fields and tables they are in sorted by field and table.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform