注册

无法解析的成员访问表达式,子查询别名作用范围

DM_009527 2026/03/26 388 13 已解决

【DM版本】:--03134284194-20251110-301199-20108 Pack56
【问题描述】*:执行报错:无法解析的成员访问表达式[A.TABLESPACE_NAME]

SELECT 
    					--output
    					'Tablespace: ' || a.tablespace_name || 
					    ', Used: ' || used ||
					    ', Used%: ' || used_pct ||
					    ', Free: ' || free ||
					    ', Max Size: ' || max_size ||
					    ', Remaining: ' || MAX_SIZE-TOTAL AS output
                      FROM (select 
                      			   a.tablespace_name,
                                   used / 1024 / 1024 || 'M' used,
                                   round(100 - b.free / used * 100, 2) || '%' used_pct,
                                   round(free / 1024 / 1024, 2) || 'M' free,
                                   round(max_size / 1024 / 1024) || 'M' max_size,
                                   round(max_size / 1024 / 1024) -
                                   used / 1024 / 1024 || 'M' "MAX_SIZE-TOTAL"
                              from (select tablespace_name,
                                           sum(bytes) used,
                                           sum(case
                                                 when maxbytes = 0 then
                                                  bytes
                                                 else
                                                  maxbytes
                                               end) max_size
                                      from dba_data_files
                                     group by tablespace_name) a,
                                   (select tablespace_name, sum(bytes) free
                                      from dba_free_space
                                     group by tablespace_name) b
                             where a.tablespace_name = b.tablespace_name
                             order by used_pct desc)

回答 0
暂无回答
扫一扫
联系客服