PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → Reports & Queries → Fonction équivalent à la fonction IIF du SQL d'ACCESS
Fonction équivalent à la fonction IIF du SQL d'ACCESS
Started by PierrotPolo, Jan., 23 2020 5:02 PM - 4 replies
Registered member
3 messages
Posted on January, 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
Registered member
1,143 messages
Popularité : +50 (142 votes)
Posted on May, 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
Posted on May, 06 2021 - 7:16 AM
Thanks to this article I can learn more. Expand my knowledge and abilities. Actually the article is very real.
Posted on May, 06 2021 - 7:17 AM
Thanks to this article I can learn more. Expand my knowledge and abilities. Actually the article is very real.
Posted on June, 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!