Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memo fields in SQL-SELECT statements
Message
 
À
22/09/1997 13:52:12
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00051069
Message ID:
00051090
Vues:
41
>To avoid NULL values in my cursors, I use something like SELECT NVL(MyField,space(len(MyField))). From what I understand, the first record in a SELECT statement determines the field's width. Since memo fields are of varying length, how do I select a memo field without getting a possible NULL value? i.e. SELECT NVL(MyMemoField,space(???))
>
>Thanks
>Elyse

How about:
SELECT MAX(LEN(ALLTRIM(MyMemoField))) AS maxlen INTO CURSOR memolen
lnMaxLen = memolen.maxlen
USE IN memolen
SELECT NVL(MyMemoField, SPACE(lnMaxLen)) ...
HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform