Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Attempting a UNION with a memo field
Message
From
22/11/2005 22:41:14
Jill Derickson
Software Specialties
Saipan, CNMI
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01071377
Message ID:
01071429
Views:
25
Thanks Sergey. I guess i should have known to try that, since the Help message for that error states:

Unions between differing column types are not allowed when one of the columns is of Memo or General type unless UNION ALL is used.

But sine I was using the SAME column type, i didn't think that was the problem.

Anyway, solved.

Thanks again, j

>Jill,
>
>The UNION performs implicit DISTINCT on the result set and it's not allowed for those type of fields. Change it to UNION ALL which doesn do DISTINCT.
>
>>
>>I am trying, and failing, to include a memo field in a UNIONed SQL SELECT. I've pared the statement down to the following:
>>
>>
>>SELECT app_activitycomments ;
>>	FROM appointments ;
>>	INTO CURSOR c_Temp ;
>>	WHERE !app_activity AND app_clientfk > 0 AND app_GroupnameFK=0 ;
>>	UNION ;
>>		SELECT app_activitycomments ;
>>			FROM appointments;
>>			WHERE !app_activity AND app_clientfk=0 ;
>>			UNION ;
>>				SELECT app_activitycomments ;
>>					FROM appointments ;
>>					WHERE app_activity
>>
>>
>>and i get the error:
>>
>>"Operation is invalid for a Memo, Blob, General or Picture field"
>>
>>I can't have a memo in a UNION SQL SELECT statement?
>>
>>TIA, j
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform