Hello. I am using Oracle SQL and need a query that returns values where the date is equal to the current date. Does Oracle have any reserved word for current date in the system?
My code:
insert into monitoracao(idseq, idsess, inst_name, elapsed_time, dateTime, fulltextsql, idsql)
SELECT idSeq.nextval,
sess.sid,
inst.instance_name,
sqla.elapsed_time,
sqla.last_active_time,
sqla.sql_fulltext,
sqla.sql_id
FROM gv$sqlarea sqla, gv$session sess, gv$instance inst
WHERE sess.sql_hash_value = sqla.hash_value
AND sess.sql_address = sqla.address
AND sess.inst_id = inst.inst_id
AND elapsed_time > 10000000
-------------------------------------------------
select inst_name, dateTime
from monitoracao, gv$sqlarea sqla
where monitoracao.DATETIME = SYSDATE;