I have a table named tblClients with the next fields: idClient, name, credit, debt.
Create table tblClients(idClient int,name varchar(20), credit int, debt int);
insert into tblClients values(1,'Guillermo',1000,0),(2,'Jess',5000,2000);
I want to categorize the type of debt like
debt = 0 NOT DEBTOR
debt between 0 AND 1000 LOW DEBTOR
debt between 1001 AND 2000 MEDIUM DEBTOR.
If I make this query I get the debtors type.
SELECT name AS 'Client',debt AS 'Debtor Type' FROM tblClients WHERE debt = 0;
SELECT name AS 'Client',debt AS 'Debtor Type' FROM tblClients WHERE debt BETWEEN 1 AND 1000;
How can I put the tag DEBTOR, LOW DEBTOR or MEDIUM DEBTOR in the column debt instead of the debt number?
Try this: