Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SUBSTR of a Memo field returns a Memo field?!
Message
De
06/07/2005 09:54:51
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01029401
Message ID:
01029432
Vues:
16
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, ;
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform