UPDATE queue_tickets AS ticket
SET display_number = project.ticket_prefix || lpad(ticket.ticket_number::text, 4, '0')
FROM projects AS project
WHERE project.id = ticket.project_id;
