Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ALLTRIM in a sql expression of cursoradapter
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01457654
Message ID:
01457659
Views:
44
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform