0
Hello. I am using Oracle SQL and need a query that returns values where the date is equal to the current date. Oracle has some word reserved 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;
what’s wrong with your consultation?
where monitoracao.DATETIME = SYSDATE
doesn’t work??– rLinhares
I noticed that in select, is being returned a date with format (day-month-year), SYSDATE returns the same format? or the format (month-day-year)?
– Daniel Campanha
Returns nothing, as if the data were not equal.
– Daniel Campanha