when it can be done in a qry, why go for PL/SQL .. do u think its more efficient than SQL? -- most of the times no.