>Funny <g> The whole reply consists of my name and quotes :) Anyway, I would always write
>select col1 colMyName, ...
>union
>select col2 colMyName, ...
>
>
>>>Hi Fabio,
>>>
I replay here ( UT have a cross message link )
>>Hi Fabio,
>>
>>I agree with David and Sergey. Why do we want to create inconsistent names to begin with and then try to blame Visual FoxPro for not resolving it properly? Even if this is a bug, it's a bug that was provoked on purpose.
>>
>
>Naomi,
>
1.
In a consistent grammar (the language), what it can be written without error is never inconsistent, otherwise the language is inconsistent.
2.
A simple example,
is more readable sol A or sol B ?
CREATE CURSOR aa (xx i,SS i)
INSERT INTO AA VALUES (1,1)
INSERT INTO AA VALUES (1,1)
CREATE CURSOR bb (yy i,zz i)
INSERT INTO BB VALUES (2,1)
INSERT INTO BB VALUES (2,1)
SELECT XX YY,COUNT(*) CNYY FROM AA GROUP BY YY HAVING CNYY => YY;
UNION ;
SELECT YY YY,COUNT(*) CNYY FROM BB GROUP BY YY HAVING CNYY => YY
SELECT XX YY,COUNT(*) CNYY FROM AA GROUP BY YY HAVING CNYY => YY;
UNION ;
SELECT YY WW,COUNT(*) CNYY2 FROM BB GROUP BY WW HAVING CNYY2 => WW
3.
complex:
a complex application has 10000 select and allows to combine her in 10000 ways,
in this case a lot of UNION can unite select with different names;
is it reasonable to impose that all the select have the same names to be able to unite her?
This is not a restriction in SQL.