>thanks Naomi, for your reply and understanding my question.
>but i have many records, which i want to show in this.
As long as you have 2 records per each ID with only 2 different years, it would work.
If you may not have records for each year (say, only 2006 and no 2007) you may need LEFT JOIN (or FULL JOIN) and NVL function. And if you may have more than 1 record per year - we need to think a bit harder, e.g. we may need to group by ID and year and use two derived tables.
If it's not broken, fix it until it is.
My Blog