我需要连接到 oracle 表并发出选择语句。当我这样做时:
SELECT T."Node" as LPAR, to_char(CAST((FROM_TZ(CAST(GET_UTC_TIMESTAMP(T."Timestamp", TMZDIFF) AS TIMESTAMP),'+00:00') AT TIME ZONE 'US/Eastern') AS DATE),'dd-Mon-yyyy hh24:mi') as DATETIME,T."MAX_Memory_Size_MB",T."MIN_Comp_Memory",T."AVG_Comp_Memory", T."MAX_Comp_Memory", T."MIN_Non_Comp_Memory", T."AVG_Non_Comp_Memory", "MAX_Non_Comp_Memory" FROM DW.KPX_PHYSICAL_MEMORY_DV T where t."Node" like 'server%'
它可以工作,但我正在使用的程序不喜欢列名周围的双引号,例如 T."Node"。
我尝试如下重写这个 sql 语句,但现在我得到了无效的标识符。
有没有解决的办法?
SELECT Node as LPAR, to_char(CAST((FROM_TZ(CAST(GET_UTC_TIMESTAMP(Timestamp, TMZDIFF) AS TIMESTAMP),'+00:00') AT TIME ZONE 'US/Eastern') AS DATE),'dd-Mon-yyyy hh24:mi') as DATETIME,MAX_Memory_Size_MB, MIN_Comp_Memory,AVG_Comp_Memory, MAX_Comp_Memory, MIN_Non_Comp_Memory, AVG_Non_Comp_Memory, MAX_Non_Comp_Memory FROM DW.KPX_PHYSICAL_MEMORY_DV where Node like 'server%'