This error may occur if the code table entry or price type is currently in use in any part of your database. Most commonly these exist in the following areas: 
  • Constituent Record (including inactive and deceased constituents)
  • Query
  • Export definition
  • Uncommitted batches 
  • Aliases on constituent records

If the code table is in use and you can not delete, instead mark the code table as inactive.