Hi all;
I previously posted an question relating to an MS SQL server query where i needed the Max() of a timestamp field. This was solved by one of the members here. I now have another db which is oracle that i need the same query to work on. For some reason a copy and paste of the query does not work as some of the fields are different. I do have a query that returns all of the fields i need.. below:
select distinct
T1.dbid,
T1.id,
T2.login_name,
T3.callid,
T3.status,
T4.login_name,
T1.headline,
T1.severity,
T1.priority,
T1.submit_date,
T5.action_timestamp
from CQOTG.Defect T1,
CQDB.users T2,
CQDB.gecontactlist T3,
CQDB.parent_child_links T3mm,
CQDB.users T4,
CQDB.history T5,
CQDB.statedef T6
where T1.submitter = T2.dbid
and T1.dbid = T3mm.parent_dbid (+)
and 16779812 = T3mm.parent_fielddef_id (+)
and T3mm.child_dbid = T3.dbid (+)
and T1.owner = T4.dbid
and T1.dbid = T5.entity_dbid
and 16777279 = T5.entitydef_id
and T1.state = T6.id
and (T1.dbid <> 0
and ((T1.mscrtype in ('Escalation')
and T1.mproduct like '%DiskXtender%'
and (T6.name not in ('Closed','Duplicate','Resolved') or T1.state = 0))))
What i am trying to do is take the records returned by this query and get the max() of the T5.action_timestamp field. When i put MAX(T5.action_timestamp) i get the following error:
ORA-00942: table or view does not exist
Does Oracle SQL support the MAX() function? i connect with Microsoft OLEDB for Oracle driver...
thanks in advance..
I previously posted an question relating to an MS SQL server query where i needed the Max() of a timestamp field. This was solved by one of the members here. I now have another db which is oracle that i need the same query to work on. For some reason a copy and paste of the query does not work as some of the fields are different. I do have a query that returns all of the fields i need.. below:
select distinct
T1.dbid,
T1.id,
T2.login_name,
T3.callid,
T3.status,
T4.login_name,
T1.headline,
T1.severity,
T1.priority,
T1.submit_date,
T5.action_timestamp
from CQOTG.Defect T1,
CQDB.users T2,
CQDB.gecontactlist T3,
CQDB.parent_child_links T3mm,
CQDB.users T4,
CQDB.history T5,
CQDB.statedef T6
where T1.submitter = T2.dbid
and T1.dbid = T3mm.parent_dbid (+)
and 16779812 = T3mm.parent_fielddef_id (+)
and T3mm.child_dbid = T3.dbid (+)
and T1.owner = T4.dbid
and T1.dbid = T5.entity_dbid
and 16777279 = T5.entitydef_id
and T1.state = T6.id
and (T1.dbid <> 0
and ((T1.mscrtype in ('Escalation')
and T1.mproduct like '%DiskXtender%'
and (T6.name not in ('Closed','Duplicate','Resolved') or T1.state = 0))))
What i am trying to do is take the records returned by this query and get the max() of the T5.action_timestamp field. When i put MAX(T5.action_timestamp) i get the following error:
ORA-00942: table or view does not exist
Does Oracle SQL support the MAX() function? i connect with Microsoft OLEDB for Oracle driver...
thanks in advance..