Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select Group By Problem
Message
De
15/10/1998 12:50:03
 
 
À
15/10/1998 11:52:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00147169
Message ID:
00147202
Vues:
26
Why it worked in 2.6 I can't answer but what is the point of listing a_icitem in the from list when you neither use any field(s) from it in the result set nor use any fields in it for comparison or filtering? That is, what purpose does a_icitem serve in your query? Also, the assumption is that the upper and lower bounds in each BETWEEN function are memory variables or are they fields in a_icitem that are mis-subscripted in the query?

>The following sql select statement has been working fine in Foxpro version 2.6 for Windows and compiles w/o error. When we compile the program containing the sql select statement in Visual Foxpro ver. 5.0 (upgrading a client's system), we get a syntax error. Further investigation indicates that it is having a problem w/the "group by" clause. Does anyone know why there is now a syntax error in VFP 5.0? Any ideas how to fix it? Thanks in advance for the help.
>
>SELECT a.item, a.loctid FROM a_ictran a, a_icitem b ;
> WHERE RIGHT(a.trantyp,1) = "R" ;
> .AND. BETWEEN(a.item, lc_bitem, lc_eitem) ;
>UNION ;
> SELECT a.item, a.loctid FROM a_icytrn a, a_icitem b ;
> WHERE RIGHT(a.trantyp,1) = "R" ;
> .AND. BETWEEN(a.loctid, lc_bloca, lc_eloca) ;
> INTO CURSOR temp1 ;
> GROUP BY 1 ;
> ORDER BY 1
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform