PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → Reports & Queries → Fonction équivalent à la fonction IIF du SQL d'ACCESS
Fonction équivalent à la fonction IIF du SQL d'ACCESS
Iniciado por PierrotPolo, jan., 23 2020 5:02 PM - 4 respostas
Membro registado
3 mensagems
Publicado em janeiro, 23 2020 - 5:02 PM
Bonjour
J'ai une table Contacts avec un champ Nom et un champ Société

Je voudrais faire une requête qui me permette de créer une colonne test qui afficherait :
le champ société quand le champ nom est vide et sinon le Champ Nom






Dans ACCESS ça donne
SELECT IIf(IsNull([Nom]),[Société],[Nom]) AS test, Contacts.Nom, Contacts.Société
FROM Contacts;

Comment peut-on convertir cette syntaxe avec le SQL de windev

Merci pour votre aide
Pierre
Membro registado
1.143 mensagems
Popularité : +50 (142 votes)
Publicado em maio, 05 2021 - 2:55 PM
Avec la fonction DECODE ....
Oui je sais, le temps a passé sous les ponts depuis le POST. J'espère que vous aviez trouvé.

--
Thierry TILLIER
Développeur Windev-Webdev
Formation Windev : https://coursdinfo.teachable.com/
Formation bureautique : https://coursdinfo.net
Tuto WINDEV sur ma chaîne Youtube
Publicado em maio, 06 2021 - 7:16 AM
Thanks to this article I can learn more. Expand my knowledge and abilities. Actually the article is very real.
Publicado em maio, 06 2021 - 7:17 AM
Thanks to this article I can learn more. Expand my knowledge and abilities. Actually the article is very real.
Publicado em junho, 02 2021 - 8:43 AM
PierrotPolo escribío:
Bonjour
J'ai une table Contacts avec un champ Nom et un champ Société

Je voudrais faire une requête qui me permette de créer une colonne test qui afficherait :
le champ société quand le champ nom est vide et sinon le Champ Nom






Dans ACCESS ça donne
SELECT IIf(IsNull([Nom]),[Société],[Nom]) AS test, Contacts.Nom, Contacts.Société
FROM Contacts;

Comment peut-on convertir cette syntaxe avec le SQL de windev

Merci pour votre aide
Pierre


Everything is very open with a clear description of the issues. It was truly informative. Your website is very helpful. Many thanks for sharing!