jeu. 29 mars 2012, 09h46
Gregory
atoutfox.public.association
Re: Comportement bizarre
create cursor proprio ;
( nom c(25), ;
prenom c(20), ;
libel c(35) ;
)
insert into proprio (nom, prenom, libel) values('Blanchard', 'Alain', '')
&& 1 enregistrement dans les deux cas
set exact on
BROWSE FOR ALLTRIM(libel)#ALLTRIM(nom)+' '+ALLTRIM(prenom)
BROWSE FOR ALLTRIM(nom)+' '+ALLTRIM(prenom)#ALLTRIM(libel)
&& (2) 1 enregistrement et 0 enregistrements
set exact off
BROWSE FOR ALLTRIM(libel)#ALLTRIM(nom)+' '+ALLTRIM(prenom)
BROWSE FOR ALLTRIM(nom)+' '+ALLTRIM(prenom)#ALLTRIM(libel)
Gregory
"Alain Blanchard" <blanchardalain@nospam.free.fr> wrote in message news:jkvc3o$1r0$1@news.niouzes.net...
Soit une table comportant un champ nom c 25, prenom c 20, libel c 35
j'ai remplacé le champ libel par allt(nom+' '+allt(prenom)
je browse ma table de la manière suivante
BROWSE FIELDS no voile,nom,prenom,libel FOR ALLTRIM(libel)#ALLTRIM(nom)+' '+ALLTRIM(prenom) norm (1)
BROWSE FIELDS no voile,nom,prenom,libel FOR ALLTRIM(nom)+' '+ALLTRIM(prenom)#ALLTRIM(libel) norm (2)
dans le cas 1 tous les enregistrements apparaissent
dans le cas 2 aucun
pour obtenir un fichier vide il faut que j'écrive
BROWSE FIELDS no voile,nom,prenom,libel FOR ALLTRIM(libel)#ALLTRIM(ALLTRIM(nom)
+' '+ALLTRIM(prenom)) norm
si je fais un
SELECT no voile,libel,ALLTRIM(nom)+' '+ALLTRIM(prenom) as nom FROM proprio;
WHERE ALLTRIM(libel)#ALLTRIM(nom)+' '+ALLTRIM(prenom) INTO CURSOR tt
pas d'enregistrement. Y a-t-il une explication a cette différence de comportement suivant la position des opérandes?
Alain de l'Ain
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000008516