November 14, 2005 at 6:40 pm
I need to replace the letters "C" for "Compte cheque", "E" for "Compte epargne" and "V" for "Compte Visa" in the same column "Type_Compte" What should I do? This way it work but it give me 3 column and I want only one column with the change
select C.Id_Client Identificateur,
NomCli Nom_Client,
PrenomCli Prenom_Client,
replace (TypCompte,"C","Compte cheque"),
replace(TypCompte,"E","Compte epargne"),
replace(TypCompte,"V","Compte Visa")Type_Compte
from client C inner join compte CO
on C.Id_Client = CO.Id_client
Thanks
November 14, 2005 at 7:51 pm
try this instead..
select C.Id_Client Identificateur, NomCli Nom_Client, PrenomCli Prenom_Client, Case TypCompte When 'C' Then 'Compte cheque' When 'E' Then 'Compte epargne' When 'V' Then 'Compte Visa' End As Type_Compte from client C inner join compte CO on C.Id_Client = CO.Id_client
**ASCII stupid question, get a stupid ANSI !!!**
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply