>Hello,
>
>I have made a CONNECTION to an external Pervasive/ ACPPAC data source. This works well.
>
>I have created and then OPENed a DATABASE which contains Remote Views of 3 specific data collection files from the CONNECTION to Pervasive/ACCPAC data sources.
>
>I have the following SQL statements (see below) and executing them is very slow!.
>
>Is there another way to decrease the number of SQL statemens and speed up getting the results?:
>
> SELECT Rv_uxdetail.custcode, Rv_uxdetail.itemnumber;
> FROM rv_UXDETAIL;
> GROUP BY Rv_uxdetail.custcode, Rv_uxdetail.itemnumber;
> INTO CURSOR crs_Items
>
> SELECT Crs_items.custcode, Crs_items.itemnumber, Rv_arcus.priclist;
> FROM crs_Items Crs_items ;
> INNER JOIN rv_ARCUS ;
> ON Rv_arcus.idcust = Crs_items.custcode;
> INTO CURSOR crs_PriceList
>
> SELECT Crs_pricelist.custcode, Crs_pricelist.itemnumber,;
> Rv_icpric.desc, Crs_pricelist.priclist, Rv_icpric.baseprice,Rv_icpric.baseunit;
> FROM crs_PriceList Crs_pricelist ;
> INNER JOIN rv_ICPRIC ;
> ON ALLTRIM(Rv_icpric.itemno) = ALLTRIM(Crs_pricelist.itemnumber);
> INTO CURSOR crs_CurrentPrice
>
>Thanks for any help.
SELECT DISTINCT Rv_uxdetail.custcode,;
Rv_uxdetail.itemnumber,;
Rv_arcus.priclist,;
Rv_icpric.desc,;
Rv_icpric.baseprice,;
Rv_icpric.baseunit;
FROM rv_UXDETAIL;
INNER JOIN rv_ARCUS ON Rv_arcus.idcust = rv_UXDETAIL.custcode;
INNER JOIN rv_ICPRIC ON ALLTRIM(Rv_icpric.itemno) = ALLTRIM(Crs_pricelist.itemnumber);
INTO CURSOR crs_CurrentPrice
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.