I have a db with dozens of tables, each with any number of and types of fields (some numeric, some string, etc). I need to loop through all these tables and populate another table (tblTFVlog) with tblname, fldname, cstrValue, and ValCount for each field in each table except for those fields that are Primary keys, memo fields, or if the field name is/contains "whatever", and also treating nulls as values to count? If I figure out for next loops to cycle through each field in each table, would the best/fastest way then be to use an append sql routine?
i.e. INSERT INTO tblTFVlog (tblname, fldname, Value, Valcount)...SELECT... tbl1.fld1, count(tbl1.fld2) AS countOffld2, .....FROM tblname1
GROUP BY tbl1.fld1;
or is there a better way?
thanks
i.e. INSERT INTO tblTFVlog (tblname, fldname, Value, Valcount)...SELECT... tbl1.fld1, count(tbl1.fld2) AS countOffld2, .....FROM tblname1
GROUP BY tbl1.fld1;
or is there a better way?
thanks