hi jmodic thanks for the help,
i tried to execute the query by modifying it,
i removed trunc an di used to_char but it still give sme some errors..
can u please modify the query that originally posted and paste it.

Thanks for the help