Subject RE: [firebird-support] (unknown)
Author Alan McDonald
> What I usually do, is create a SQL statement, that creates a SQL
> script which in turn does what I want:
>
> select 'SELECT cast('''||rtrim(rdb$relation_name)||''' as
> varchar(100)), count(*) FROM '||rtrim(rdb$relation_name)||' UNION '
> from rdb$relations
>
> will create a SQL Statement that returns all table counts.
>
> You only have to remove the last UNION keyword
>
> If anybody knows if there is a different way to create a UNION with
> one constant field, and a numeric field, other then casting the
> constant to varchar() please let me know
>
> SELECT 'table1', count(*) from table1
> UNION
> SELECT 'table2', count(*) from table2
>
> does not work.
>
>
> Regards
> Thomas

If I hit my databases with this statement I'd have to take a holiday
:-)
needless to say I'm not tied mentally to how many records are in any
particular table
Do you put this in your client app?
Alan