Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select Distinct Memo?
Message
From
22/08/1998 09:40:18
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00128771
Message ID:
00129030
Views:
47
>Yes, I just noticed the same behavior when I tried it with a .vcx file. It works fine with a .dbf file...curious. Anyway I was able to pull the baseclasses by using:
>
>select distinct allt(left(baseclass,20)) as cBaseClass from about.vcx
>
>>
>>Hi Ken,
>>I tried that before posting and again just now. My result is a 3 record cursor with descript as C,1 field. So I get records for blank, "c", "d" when really I should be getting "cursor" and "dataenvironment". :( Any other thoughts while I play with Ed's suggestion?

There are some things we'd like to see in a form of a white paper on some properties of Fox's SQL, and the method it uses to decide widths of columns would be near the top of this list. Using AllTrim() as a column may lead to colums of different widths, depending on the contents of the first record in the table it encounters. The same goes for numeric functions: sum() may return integers even though the source column had decimals, just because the first record(s) lack(s) decimal part.

The suggestion for numerics was always to do Select 00000000.00+sum(whatever) ... ; the analogous suggestion for memos would be something which would enable the parser to determine the length of the string - like PadR(alltrim(memo_field),40) or something like that. Then you should get a C(40) column.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform