Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT data from a Char type field into a Memo type fiel
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00310779
Message ID:
00310859
Views:
16
>Does anybody know how to do SQL SELECT statement that will move data from a character type field and move it into a memo field in the cursor?
>
>This is not trying to pull data from an existing memo field, but trying to create a new memo field that is populated with the data from the character field and will be massaged later on in the code.
>
>
>CREATE CURSOR memotable (mfield M)
>INSERT INTO memotable (mfield) VALUES ('')
>SELECT mfield FROM memotable ;
>       UNION (SELECT cfield FROM chartable) ;
>       INTO CURSOR memocursor
>
>gives a UNION INCOMPATIABLE ERROR.
>
>Any suggestions?


Here are a couple of ways.

*Using table instead of cursor
SELECT cfield as mfield FROM chartable INTO TABLE memotable
ALTER TABLE memotable ALTER mfield M


*Using cursor
CREATE CURSOR memotable (cfield M)
APPEND FROM chartable FIELDS cfield
ALTER TABLE memotable RENAME COLUMN cfield TO mfield
Michael McLain
Previous
Reply
Map
View

Click here to load this message in the networking platform