Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter expression not working in a view
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01212011
Message ID:
01212760
Views:
12
VFP View Designer is very limited and can properly work with basic views only. You can use third party tools, like eView File #9474 or http://www.whitelightcomputing.com/prodvieweditorfree.htm

>Thanks for answering back Sergey. I tried the HAVING and it works, but when I go to open the view designer after saving the first time and exit it give me an error saying:
>
>
>SQL: HAVING clause is invalid
>
>
>It seems like when I save the view with
>
>HAVING  SUM( rd_qtyrec ) < Orders.o_qty;
>
>everything is fine, but when I go back into the view the second time, the HAVING clause turns back into
>
>
HAVING  ( rd_qtyrec ) < Orders.o_qty;
>
>
>without the SUM expression and hence gives me the error when saving the second time around. I keep having to go back and add the SUM when opening the view designer. Here is the whole thing saved with SUM
>
>
>SELECT Orders.o_orderno, Products.p_productname, Orders.o_orddte,;
>  Orders.o_ordcomp, Orders.o_qty, Orders.o_unitprice, Orders.o_orderedby,;
>  Products.p_warehouseno, Vendors.v_name, Orders.o_checkmark,;
>  Orders.o_v_vendorid, Orders.o_p_productid, Orders.o_orderid,;
>  Orders.o_w_whsid, Whsupv.whs_name, Orders.o_tmp_amt, Orders.o_tmp_qtyrec,;
>  Orders.o_tmp_daterec, SUM(Recdetail.rd_qtyrec);
> FROM ;
>     warehouse!orders ;
>    INNER JOIN warehouse!products ;
>   ON  Orders.o_p_productid = Products.p_productid ;
>    LEFT OUTER JOIN warehouse!recdetail ;
>   ON  Orders.o_orderid = Recdetail.rd_o_orderid ;
>    LEFT OUTER JOIN warehouse!whsupv ;
>   ON  Orders.o_w_whsid = Whsupv.whs_id ;
>    LEFT OUTER JOIN warehouse!vendors ;
>   ON  Orders.o_v_vendorid = Vendors.v_id;
> WHERE  Orders.o_orddte >= ( ?lc_bdate );
>   AND  (  Orders.o_orddte <= ( ?lc_edate );
>   AND  (  Orders.o_w_whsid BETWEEN ?lc_fwid AND ?lc_twid;
>   AND  Orders.o_ordcomp == ( "NO" ) ) );
> GROUP BY Orders.o_orderno, Products.p_productname, Orders.o_orddte,;
>  Orders.o_ordcomp, Orders.o_qty, Orders.o_unitprice, Orders.o_orderedby,;
>  Products.p_warehouseno, Vendors.v_name, Orders.o_checkmark,;
>  Orders.o_v_vendorid, Orders.o_p_productid, Orders.o_orderid,;
>  Orders.o_w_whsid, Whsupv.whs_name, Orders.o_tmp_amt, Orders.o_tmp_qtyrec,;
>  Orders.o_tmp_daterec;
> HAVING  SUM( rd_qtyrec ) < Orders.o_qty;
> ORDER BY Orders.o_orddte
>
>
>Is this a fluke with view designer?
>
>thanks again
>
>Nick
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform