Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find all tables with a field
Message
 
To
10/03/2004 12:59:14
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00884904
Message ID:
00884918
Views:
12
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform