We had a similar problem with our Soft Coated Wheaten Terrier and discovered thet it was a diet related problem. He had a number of sores that he scratched at until they bled - very distressing for all of us! If you can find out what the cause is that will obviously help so a trip to the vet might be in order.
We gave Bill a Piriton tablet (on advice from our vet), which seemed to help but no more than twice a day depending on the size of the dog. Also Germolene (spelling?) ointment dabbed on to the sores to help prevent infection, although, according to the vet, dogs quite like the taste and will try and lick it off! We also used one of those Elizabethan plastic coller things to stop him licking which works but is quite upsetting for the dog as he looks a bit of a pratt! Hope this helps but you really need to try and find the cause which can be tricky. Good luck! X