I need to create a trigger for inserting in such a way that while inserting a record, if we try to insert duplicate value (exept nulls)in a particular column, that record should not be inserted. The rest of the records should get inserted.
a trigger is not the way to go. depending on the situation I would use some kind existence check and you can do this in your insert most likely. Do you have some code to share? Have you ever used NOT EXISTS of LEFT OUTER JOINS?