Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SUBSTR of a Memo field returns a Memo field?!
Message
From
06/07/2005 09:54:51
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01029401
Message ID:
01029432
Views:
15
Doh! I was thinking that the 2nd number was the ending position, not the length. Thanks!

>Your second column would end up being 500 characters in length, which I believe would force it to a memo. From your earlier description, don't you want something more like this?
>
>
>CREATE CURSOR junk ( junk m )
>INSERT INTO junk VALUES ( REPLICATE( "X", 5000 ) )
>
>SELECT TRANSFORM( SUBSTR( junk,   1, 250 ) ) AS junk1, ;
>       TRANSFORM( SUBSTR( junk, 251, 250 ) ) AS junk2 ;
>  FROM junk
>
>LIST STRUCTURE
>
>
>I get data in both columns with that.
>
>>Sounded like a great idea, but only the first one (Description01) contains any values after the SQL runs. Any reason why the 2nd and subsequent ones would be empty?
>>
>>
>>
>>	TRANSFORM(SUBSTR(crsContributions.mNotes,1,250)) AS Description01, ;
>>	TRANSFORM(SUBSTR(crsContributions.mNotes,251,500)) AS Description02, ;
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform