Hi Michael,
LTrim() will remove the leading blanks. LTrim(RTrim()) Will remove leading and trailing blanks.
Regards,
Liam
>Anyone can tell me why this is not working and what I should do to make it work?
>
>
>? SQLExec(lnHandle,'SELECT ALLTRIM(STR(YEAR(AddDate))) FROM News')
>
>
>This would work:
>
>
>? SQLExec(lnHandle,'SELECT STR(YEAR(AddDate)) FROM News')
>
>
>But, spaces are present in front of the field value in the cursor.
Liam O'Hagan
MCP VFP Desktop Apps