Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
The following is part of the code from a click event. The only difference is that the entire select/union all statement (the body) is repeated 3 more times for lengths 4, 6, and 8. The objective is to list total bundles (data1.bundles + data2.bundles + ...) per record. When the event occurs, it produces a syntax error.
public gdValue
gdValue = Thisform.gd1.displayvalue
public szValue
szValue = Thisform.sz1.displayvalue
select bundle,length,grade,siz,shipdataid;
from data1;
into cursor 2ft;
where grade = gdValue and siz = szValue and length = 2;
union all;
select bundle,length,grade,siz,shipdataid;
from data2 ;
where grade = gdValue and siz = szValue and length = 2 ;
union all;
select bundle,length,grade,siz,shipdataid;
from data3 ;
where grade = gdValue and siz = szValue and length = 2 ;
union all;
select bundle,length,grade,siz,shipdataid;
from data4 ;
where grade = gdValue and siz = szValue and length = 2 ;
union all;
select bundle,length,grade,siz,shipdataid;
from data5 ;
where grade = gdValue and siz = szValue and length = 2 ;
union all;
select bundle,length,grade,siz,shipdataid;
from data6 ;
where grade = gdValue and siz = szValue and length = 2 ;
union all;
select bundle,length,grade,siz,shipdataid;
from data7 ;
where grade = gdValue and siz = szValue and length = 2 ;
union all;
select bundle,length,grade,siz,shipdataid;
from data8 ;
where grade = gdValue and siz = szValue and length = 2
REPORT FORM siz_grade2.FRX preview
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement