Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo fields in SQL-SELECT statements
Message
 
To
22/09/1997 13:52:12
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00051069
Message ID:
00051090
Views:
36
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform