質問があります...sysdate と「作成時間」という名前の列の差を計算するにはどうすればよいですか? これはSQLの一部です(私はOracleデータベースを使用しています):
$g->select_command = "select c.case_id as \"NGM ID\",
s.NE_PRIORITAET as \"NE Prio\",
case substr(s.NE_ID, 2,1)
when '1' then 'Nord'
when '2' then 'Nord'
when '3' then 'Ost'
when '4' then 'Ost'
when '5' then 'Mitte'
when '6' then 'West'
when '7' then 'Süd'
when '8' then 'Mitte'
when '9' then 'Süd'
else 'Error'
end as \"Region\",
c.STATUS_NGM as \"NGM Status\",
s.AUFTRAG as \"Auftrag\",
s.NE_ID as \"NE ID\",
s.STATUS as \"SAP Status\",
substr(to_char(to_timestamp(Sysdate, 'YYYY/MM/DD HH24:MI:SS') - to_timestamp(s.CREATION_TIME, 'YYYY/MM/DD HH24:MI:SS'), 'YYYY/MM/DD HH24:MI:SS'), 8) as \"Diff Beginn Sap Ende\",
case trim(s.KATEGORIE)
when '1' then 'INSLA'
when '2' then 'OUTSLA'
else s.KATEGORIE
end as \"SLA\",
c.CREATION_TIME as \"NGM Creation Time\",