select c.message, c.message_format, t.ticket_id, t.name as ticket_name from ttl_comments c, ttl_v_tickets t where comment_id = :comment_id and c.ticket_id = t.ticket_id select acs_object_id_seq.nextval as comment_id, name as ticket_name from ttl_v_tickets t where ticket_id = :ticket_id