>>You could use ltrim(),rtrim() as Liam said. Alternatively you could use the convert function :
>>
SQLExec(lnHandle,'SELECT convert(char(4),YEAR(AddDate)) FROM News')
>
>Ok, this is good. As you may read in the other message I just created in this thread, I was looking for a way to remove the extra spaces at the end. So, this does it ok. However, this SQL syntax only work in SQL Server. Wouldn't there be a way to have a common SQL Syntax to be supported for VFP native table and SQL Server?
Wish there could be :) Each database engine might have its own functions. ltrim(), rtrim() are ones that are common in all I know. We might expect all SQL server functions to be supported in future VFP versions - optimistic thinking they're both MS products :)
Cetin