Hello,
I have a table called employee. Any time anything is added or updated
on this table there is trigger that fires off and send copies of the
data to another table called Emp_audit with the current timestamp. I
want to create a query of the employee's name, date, and time from
Emp_audit. However the tricky part is I've been asked to put the
string 'inserted on' by the rows date when it was added and 'Updated
on' by the date when it was updated.
For example, I need to Select NAME, 'Inserted on' || DATE, from
EMP_audit where rows that are insert rows.
AND
Select Name, 'Updated on' || Date, from EMP_audit where *rows that are
update rows*
I need to do this in one statement but I have no idea where to begin
here. Anyone have any ideas?
I have a table called employee. Any time anything is added or updated
on this table there is trigger that fires off and send copies of the
data to another table called Emp_audit with the current timestamp. I
want to create a query of the employee's name, date, and time from
Emp_audit. However the tricky part is I've been asked to put the
string 'inserted on' by the rows date when it was added and 'Updated
on' by the date when it was updated.
For example, I need to Select NAME, 'Inserted on' || DATE, from
EMP_audit where rows that are insert rows.
AND
Select Name, 'Updated on' || Date, from EMP_audit where *rows that are
update rows*
I need to do this in one statement but I have no idea where to begin
here. Anyone have any ideas?