Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reverse comma-delimited string
Message
From
06/09/2019 14:49:17
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
06/09/2019 04:56:59
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01670542
Message ID:
01670665
Views:
48
>>>> And thought that I had been through it all. Certainly not. I learned quite a few tricks reading this great resource.
>>
>>Recently I dug out one of Tamar's historic articles wrt a parsing need. The article covered the ancient Copy to Array that is very quick for smaller resultsets and resulted in new functions in VFPA to speed up bit manipulation- check out VFPA's new Calculate BOR/BAND expressions.
>>
>>I learned something else new last week: GATHER performs on-the-fly casting for different field types.
>>
>>
create cursor c_test (intvar i, dubvar B, charvar c(20),datevar c(20))
>>append blank
>>intvar="100"  && I am a string, about to be GATHERed into an Integer field
>>dubvar="100" && I am a string, about to be GATHERed into a Double field
>>charvar=100 && I am a numeric, about to be GATHERed into a string field
>>datevar=date() &&I am a date, about to be GATHERed into a string field
>>gather memvar
>>browse
Also does with an object, on-the-fly conversion will work where insert from name won't (which is weird, though).

>Actually SQL server does do the same in many instances.

Not quite. Its conversion is very limited - you may have two million strings containing digits and they'll be converted into integers, but then a sixteen minute transaction will take a long time to revert because two million and first string contains digits and an extra character. It will bang gloriously, and I think you know some examples of that.

back to same old

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

Click here to load this message in the networking platform