UpperCase (exp)
De Wiki1000
Version du 13 janvier 2015 à 10:47 par Syfre (discuter | contributions)
function upperCase(field:string):string;
Retourne la valeur en majuscule de l'attribut.
Exemple :
//Procedure TestSearch; Type CustomerAddressView = ViewOf(TClient) company: string = tiers.raisonSociale; street: string = sitePrivilegie.adresse.nomRueVoie; zipCode: string = sitePrivilegie.adresse.codePostal; country: string = sitePrivilegie.adresse.pays.code; oidInterlocuteurSociete:string = Commercial.oidContactEtablissement; town: string = sitePrivilegie.adresse.ville; end var ls:TSelector; inst:CustomerAddressView; begin ls := CustomerAddressView.CreateSelector('upperCase(town)=%1','',true,['clichy']); foreachP inst in ls.AsCursor do begin end; end;
Le code SQL généré par le filtre :
select t1.raisonSociale "company",t4.code "country",t5.oidContactEtablissement "oidInterlocuteurSociete",t6.nomRueVoie "street",t6.ville "town",t6.codePostal "zipCode",t0.oid "oid",t0.idOTP "idOTP",t0.UpdStamp "UpdStamp",t0.UpdDate "UpdDate",t0.UpdUser "UpdUser" from dbo.TROLETIERS t0 join dbo.TTIERS t1 on t1.oid=t0.oidTiers join dbo.TSITE t2 on t2.oid=t0.oidsitePrivilegie join dbo.TADRESSE t3 on t3.oid=t2.oidAdresse join dbo.TPAYS t4 on t4.oid=t3.oidPays join dbo.TROLECONTACT t5 on t5.oid=t0.oidCommercial join dbo.TADRESSE t6 on t6.oid=t2.oidAdresse where (t0.idOTP in (50,377)) and upper(t6.ville) = N'clichy' order by t0.oid
Voir aussi: