SELECT LTRIM(RTRIM(STR(YEAR(AddDate)))) FROM Newswill work either in VFP or for SQL Server. However, this creates some extra spaces at the end of each field for that expression. I do however have the same in VFP. In order to avoid that, I have to use:
SELECT SUBSTR(LTRIM(RTRIM(STR(YEAR(AddDate)))),1,4) FROM Newswhich, of course, don't work in SQL Server. It must be too early for me here. What am I missing?