Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preventing a .null. in a Memo SQL field
Message
 
 
To
05/10/2001 15:52:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00564968
Message ID:
00564998
Views:
9
This message has been marked as the solution to the initial question of the thread.
>Larry,
>
>I am using VFP 6.0. Actually, I didn't put my full SQL statement before. I am actually doing a UNION also. Here is my complete code.
>
>
>SELECT tmpShops.*, shopques.*, ;
>      IIF(ISNULL(shopextr.extratitle), "", shopextr.extratitle) AS extratitle, ;
>      IIF(ISNULL(shopextr.extratext), "", shopextr.extratext) AS extratext ;
>   FROM  tmpShops, shopques LEFT OUTER JOIN shopextr ;
>      ON  Shopques.shopquesid = shopextr.shopquesid ;
>   WHERE (shopques.shopid = tmpShops.shopid) ;
>      AND (shopques.shopid IN (SELECT shopid ;
>                                  FROM tmpShops)) ;
>   INTO CURSOR tmpExport ;
>UNION ;
>   SELECT tmpShops.*, cursques.*, ;
>         IIF(ISNULL(cursextr.extratitle), "", cursextr.extratitle) AS extratitle, ;
>         IIF(ISNULL(cursextr.extratext), "", cursextr.extratext) AS extratext ;
>      FROM  tmpShops, cursques LEFT OUTER JOIN cursextr ;
>         ON  cursques.shopquesid = cursextr.shopquesid ;
>      WHERE (cursques.shopid = tmpShops.shopid) ;
>         AND (cursques.shopid IN (SELECT shopid ;
>                                    FROM tmpShops))
>
>
>
>I thought the problem was with the ISNULL statement, but it looks like I am wrong. What confuses my is that if I just let FoxPro put the .null. in the memo fields the UNION will work fine. But when I try to stop the .null. it gives me the error I listed above.
>
>Chris

Chris,
Add the ALL keyword to the UNION clause. It appears as though the default duplicate killing nature of the UNION uses a grouping functionality to do it. Since this is not supported for memo fields, you get the error. The ALL will simply append one result set to the other.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform