Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this a BUG
Message
De
21/02/1999 19:17:13
 
 
À
21/02/1999 18:36:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00189702
Message ID:
00189831
Vues:
7
>>>>Never thought about that one. Maybe padr(alltrim(somefield), 40, " ") would keep the field at a reliable width of 40 or whatever number you select, thus avoiding the problem?
>>>
>>>Suppose that would work. Really the only thing I can think of that would require an ALLTRIM is the concatenation of two or more fields. Then the PADR solution would fit the bill.
>>
>>And in that particular case, you're probably better off concatenating with the - operator, which moves the trailing blanks of the first argument to the end of the concatenation.
>
>Right. But the usual case for concatenation fom my experience is stuff like:
>
>ALLTRIM(fname) + " " + mi + ". " + ALLTRIM(lname)
>
>However, I have gotten out of the habit of doing this in the query, and just doing it in the report or whatever I am building the query or view for.

Yes, that's where exact concatenation with ALLTRIM() is needed (BTW, there's a problem with that example for formatting people with no middle initial!), but I rarely need to use that in an index or SQL select statement (ordinarily, it's only significant when formatting output. I'm sure there are circumstances where it's necessary for people to do this; I'm just thankful that i can avoid it nearly all the time...

Ed
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform