select
case
when
email is not null
then
title||' ('||email||')'
else
title
end,
user_id
from
cc_users
where
user_id <> :user_id
order by
title asc
select
title,
status_id
from
t_task_status
order by
status_id
select
t.title as task,
t.description,
t.comment,
to_char(t.due_date,'YYYY-MM-DD') as due_date,
t.priority, t.status_id as status, t.object_id, t.assignee_id
from
t_tasks t
where
t.task_id = :task_id
select
creation_user
from
acs_objects
where
object_id = :task_id