Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ALLTRIM syntax not support with SQL Server
Message
De
10/04/2003 08:13:08
 
 
À
10/04/2003 03:26:18
Liam O'Hagan
O'Hagan Programming Ltd
Irlande
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00775890
Message ID:
00775950
Vues:
17
>LTrim() will remove the leading blanks. LTrim(RTrim()) Will remove leading and trailing blanks.

Ok, using:
SELECT LTRIM(RTRIM(STR(YEAR(AddDate)))) FROM News
will 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 News
which, of course, don't work in SQL Server. It must be too early for me here. What am I missing?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform