RE: Sum UP all the table
Posted in 2001
For nptotal a simpler SQL sentence would be:
select dbsname,sum(size) from sysextents group by dbsname
If you want to sum npused, npdata or rows, I think your query would have to
be:
select dbsname,sum(nptotal),sum(npused),sum(npdata),sum(nrows)
from systabnames t, sysptnhdr h
where h.partnum=t.partnum group by dbsname
Carlos
> -----Mensaje original-----
> De: Tham Huei Hwan [SMTP:hhtham@apis.dhl.com]
> Enviado el: Martes 16 de Enero de 2001 10:02 PM
> Para: informix-list
> Asunto: Sum UP all the table
>
> All,
>
> Can someone show me the sql syntax to add up all the tables (nptotal,
> npused,npdata,nrows) under the same dbspaces name. I am running
>
> "select dbsname, nptotal, npused, npdata ,nrows
> from systabnames a, sysptnhdr b"
>
>
> Thanks and Regards,
>
> Tham
>