Cool_Dude_eh
New Member
Hello,
I am looking for a quick way to go through every table in a database and determine if there are any records in the table for dump and load purposes.
(not necessarily a count, just is there 1 or more records)
I have read quite a bit about people attempting to count how many records are in tables, but I have not found a clear answer.
If only something like this would work.
Anyone have any ideas?
[FONT=r_ansi]output to loadlist.txt.
def var i as int init 0.
for each _file where _file-number > 0:
for each value(_file-name):
/* _file-name is field in _file with table name */
i = i + 1.
if i > 1 then
do:
display _file-name.
i = 0.
/* more code here ..... */
next.
end.
end.
end.
[/FONT]
I am looking for a quick way to go through every table in a database and determine if there are any records in the table for dump and load purposes.
(not necessarily a count, just is there 1 or more records)
I have read quite a bit about people attempting to count how many records are in tables, but I have not found a clear answer.
If only something like this would work.
Anyone have any ideas?
[FONT=r_ansi]output to loadlist.txt.
def var i as int init 0.
for each _file where _file-number > 0:
for each value(_file-name):
/* _file-name is field in _file with table name */
i = i + 1.
if i > 1 then
do:
display _file-name.
i = 0.
/* more code here ..... */
next.
end.
end.
end.
[/FONT]