Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stripping Spaces from SQL ASCII Output
Message
From
22/04/1998 13:36:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00093816
Message ID:
00094066
Views:
26
>>>If I do [SELECT ALLTRIM(STR(number)) TO FILE ascii.txt] I get leading blanks in the output for records where the length of the data is less than the maximum length. I need output data with no leading or trailing blanks. Any ideas?
>>>
>>>Bob
>>
>>SELECT ALLTRIM(STR(number)) as dummy from table1 into cursor tmp nofilter
>>copy to ascii.txt type ....
>
>Bob (via Ed)
>
>Be very careful with a SQL-SELECT field of variable length. They default to the length of the FIRST record, so some data may be truncated. I ran into this with an ALLTRIM(name). The system worked fine on my test data (first name 'Christophersen') and failed on the live data (first name 'NG') :-)
>
>Barbara
Yes Barbara good point. I always hated to add something like padr() to recover it.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform