What is the best way of distinguishing pancreatic cancer from focal pancreatitis?

What is the best way of distinguishing pancreatic cancer from focal pancreatitis?

Needle biopsy, either by endoscopy or by guided imaging (CT or ultrasound)