Имам таблица, която има номер на поръчка, анулирана дата и причина. Полето за причина е полето 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.