The "into cursor mycursor" clause belongs in the first SELECT statement, like this:
select bundle,length,grade,siz,shipdataid;
from data1 ;
into cursor mycursor ;
where grade = gdValue and siz = szValue and length = 2 ;
union all;
etc.
Also, the "union all" after the last "where" is superfluous, and be sure the last line in the statement does not end with a semi-colon.
>Ok, well i'm trying your method because it sounds logical, but i get a syntax error. can anyone see why? the code is:
>
>select bundle,length,grade,siz,shipdataid;
>from data1 ;
>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 ;
>union all;
>into cursor mycursor ;
>
>///////////////////////////////////////////////////////////////////////////////
Rick Borup, MCSD
recursion (rE-kur'-shun) n.
see recursion.