General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only