PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y 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, 23,ene. 2020 17:02 - 4 respuestas
Miembro registrado
3 mensajes
Publicado el 23,enero 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
Miembro registrado
1.143 mensajes
Popularité : +50 (142 votes)
Publicado el 05,mayo 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
Publicado el 06,mayo 2021 - 07:16
Thanks to this article I can learn more. Expand my knowledge and abilities. Actually the article is very real.
Publicado el 06,mayo 2021 - 07:17
Thanks to this article I can learn more. Expand my knowledge and abilities. Actually the article is very real.
Publicado el 02,junio 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!