![]() |
|
Archives of the TeradataForumMessage Posted: Thu, 16 Mar 2006 @ 17:46:23 GMT
Try this:
SELECT
SUM(a.CurrentPerm)
,b.DataBaseName
,b.TableName
,b.ColumnName
FROM
DBC.TableSize a, DBC.Indices b
WHERE
a.DatabaseName = b.DataBaseName
AND
a.TableName = b.TableName
AND
b.IndexType = 'S'
AND
b.UniqueFlag = 'N'
GROUP BY
b.DataBaseName
,b.TableName
,b.ColumnName
ORDER BY
SUM(A.CurrentPerm) DESC
,b.ColumnName ASC
,b.TableName ASC
,b.DataBaseName ASC
;
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||