Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get New Memo Field in SQL
Message
From
24/07/2008 12:33:13
 
 
To
24/07/2008 10:28:57
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01333741
Message ID:
01333781
Views:
13
>I'm trying to do that little trick to get a new memo field in a SQL, but can't quite recall how to do it. This is what I have, which returns an error on the SQL:
>
>CREATE CURSOR GetMemo (Action M)
>
>SELECT *, ;
>	SPACE(254) AS Description, ;
>	GetMemo.Action AS Action ;
>	FROM X12_Response ;
>	JOIN GetMemo ;
>	INTO CURSOR crsWorkList ;
>	READWRITE
>
Hilmar gave the solution, but if you ever need to do this in an older version.........

There are two problems with what you tried.

I'm pretty sure you got an error message because JOIN requires a condition. You don't really need the JOIN. You can include both tables in the FROM clause.

When you correct that, however, you will have an empty resultset because there are no records in GetMemo. You could either do a LEFT JOIN (each Action field would be NULL) or append a blank record into GetMemo.
CREATE CURSOR GetMemo (Action M)
APPEND BLANK

SELECT *, ;
	SPACE(254) AS Description, ;
	GetMemo.Action AS Action ;
	FROM X12_Response,
	JOIN GetMemo ON .T.;
	INTO CURSOR crsWorkList ;
	READWRITE


or

SELECT *, ;
	SPACE(254) AS Description, ;
	GetMemo.Action AS Action ;
	FROM X12_Response, GetMemo ;
	INTO CURSOR crsWorkList ;
	READWRITE
(You will not be shocked to learn that I know this because I had the same problem back in September and Sergey provided the solution.)
Previous
Reply
Map
View

Click here to load this message in the networking platform