On Sun, Apr 5, 2015 at 6:12 PM, Ted Roche <tedro...@gmail.com> wrote:

> Matt's answer works.
>
> Or you can use the VFP call SQLTables() to get a list of tables, then
> loop through there, executing SELECT COUNT(*) FROM {tablename} to get
> the record counts.
> ------------------------



This was eloquent:

EXEC sp_MSForEachTable @command1='INSERT #counts (table_name,
row_count) SELECT ''?'', COUNT(*) FROM ?'

SELECT table_name, row_count FROM #counts ORDER BY table_name, row_count
DESC


The SP_MSForEachTable is a strong sproc that will run the same command for
all tables.  Insert the result into a working table and you are good to go.






-- 
Stephen Russell
Sr. Analyst
Ring Container Technology
Oakland TN

901.246-0159 cell


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJidMYL_fwxGsdEuuRJhkn=i_rwkqbshpy4c489kvxafbxr...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to