Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ALLTRIM in a sql expression of cursoradapter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01457654
Message ID:
01457659
Vues:
45
>Thank
>
>
>I try with a UDF function but Error
>
>
>      PRIVATE ab
>      Ab = CREATEOBJECT("cruflaaa.CRUFLaaa")
>WAIT WINDOW  Ab.cAlltrimAmline( "    testg                     ")  Good result
>
>
>      TEXT TO .SELECTCMD NOSHOW TEXTMERGE PRETEXT 15
>			SELECT HDBK, Hid , HDOCNO, HAMOUNT,  STR( HDOCDATE ) AS 'DATEDOC',CREATEDBY,
>			STR(Createdon) AS 'createdon' , hremint  FROM <<.TABLES>>
>			WHERE Ab.cAlltrimAmline( HDBK ) LIKE '<<Vp_in>>'
>      ENDTEXT
>
>
>But here function Ab.cAlltrimAmline NOT defined !

Why do you need to use UDF at all? If you want to get rid of spaces, use
      TEXT TO .SELECTCMD NOSHOW TEXTMERGE PRETEXT 15
			SELECT HDBK, Hid , HDOCNO, HAMOUNT,  STR( HDOCDATE ) AS 'DATEDOC',CREATEDBY,
			STR(Createdon) AS 'createdon' , hremint  FROM <<.TABLES>>
			WHERE RTRIM(LTRIM( HDBK )) LIKE '<<Vp_in>>'
    ENDTEXT
Also, are you sure that it's valid to use STR function with dates?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform