My app has some complex re****ts that require a number of selects
in order to build the table to re****t. I use a lot of cursors. To
keep track of them, I create a variable with the name. I stuff the
value in an array and at the end, use a loop release the cursors.
In a number of cases, I can use () to resolve the alias name as
below with alrawtrans in the from clause and alpcl in the into clause.
The problem is with column-names. I have to go back to & as with
"&alrawtrans..wonbr".
SQLSEL;
&alrawtrans..wonbr,;
sum(int(quantity)) as cpcl,sum(qty2) as tweight;
from (alrawtrans);
inner join cwko on cwko.wonbr=&alrawtrans..wonbr;
inner join ccat on ccat.wocatype=cwko.wocatype;
where;
left(funccode,len(alltrim(wfcpref)))=wfcpref and;
chgcli in ("P","Y");
group by &alrawtrans..wonbr;
into cursor (alpcl) nofilter
Because there are two wonbr, I can not simply drop the
"&alrawtrans..".
(alrawtrans).wonbr
does not work. (I really wish it would). I could use
(alrawtrans+".wonbr")
but that is worse than & for readability.
What do you use?
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


|