PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → Etats & Requêtes → Fonction équivalent à la fonction IIF du SQL d'ACCESS
Fonction équivalent à la fonction IIF du SQL d'ACCESS
Débuté par PierrotPolo, 23 jan. 2020 17:02 - 4 réponses
Membre enregistré
3 messages
Posté le 23 janvier 2020 - 17:02
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
Membre enregistré
1 143 messages
Popularité : +50 (142 votes)
Posté le 05 mai 2021 - 14:55
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
Posté le 06 mai 2021 - 07:16
Thanks to this article I can learn more. Expand my knowledge and abilities. Actually the article is very real.
Posté le 06 mai 2021 - 07:17
Thanks to this article I can learn more. Expand my knowledge and abilities. Actually the article is very real.
Posté le 02 juin 2021 - 08:43
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!