mercredi 28 septembre 2016

IF ELSE in Microsoft sql

I have the following column in Microsoft SQL Server called Type and I want to create another column called Type 1. Type 1 would be 1 if account starts with letter A, 2 if account starts with D....

I am new with this so could someone please advise?

Type    Type 1  
AD  1  
AV  1  
AC  1  
DE  2  
DR  2  
DG  2  
KL  3  
KL  3  

Aucun commentaire:

Enregistrer un commentaire