Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy to and Copy memo
Message
From
05/09/2000 18:32:58
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00412611
Message ID:
00412673
Views:
27
>I have a table I recreated with a number of fields in it. One filed is a Memo field that has info in it. I want to copy the whole table into a delimited file with all the fields including the Memo field. When I do this: COPY TO JUNK.TXT DELIMITED, I get all the fields except the Memo field contents.
>
>Is there a trick to this? I know about the COPY MEMO command but this leaves out the other fields.
>
>Thanks in advance.

One trick is to convert the memo to a character field (however you'll get only the first 254 characters):
SELECT ;
  *, ;
  PADR(MemoToC(A.MyMemo), 254, " ") AS cCharFld ;
  FROM MyTable A ;
  ...

FUNCTION MemoToC
LPARAMETERS tcMyMemo
* Above implicitly converts the memo to a character string
RETURN tcMyMemo
If you've got more than 254 characters you'll have to use multiple character fields and get tricky splitting up the memo.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform