Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

hierarchy (recursive) query - response (1) by anurag1612

$
0
0

Here is the solution -

locking row for access

SELECT DATABASENAME, 

TABLENAME, 

SUM(CURRENTPERM)/1024/1024/1024

FROM DBC.TABLESIZE 

where databasename in (SELECT DISTINCT TRIM(child) AS DB

FROM   dbc.children A

WHERE               (parent = TRIM('D1') 

              --  OR         TRIM(child) = TRIM('audata00_vha')

))

 GROUP BY 1, 2

 order by 3 desc

 

 


Viewing all articles
Browse latest Browse all 14773

Trending Articles