У меня есть таблица с номером заказа, датой отмены и причиной. Поле «Причина» представляет собой поле типа varchar (255), и оно было написано многими разными торговыми представителями, и его очень сложно сгруппировать по категории причин. Мне нужно создать отчет для классификации причин отмены. Как лучше всего проанализировать причины с помощью TSQL?
Пример причин, введенных торговым представителем
cust already has this order going out
cust can not hold for item Called to cancel order
cust doesn't want to pay for shipping
wife ordered same item from different vendor, sent email
cst made a duplicate order, sent email
cst can't hold
Cust doesn't want to go through verification process so is cancelling order
doesn't ant to hold for Bo
doesn't want
Cust called to cancel the order He can no longer get the product he wants
cnt hld
will not comply with export req
cant' hold
Custs request
Cust will not hold for BO
per. cust. request.
Кстати, у меня SQL Server 2005.