Bug #22044 When i use UNION in creation of a view i get error code 1064
Submitted: 6 Sep 2006 8:19 Modified: 6 Sep 2006 9:50
Reporter: Praveen Kumar Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.22 OS:Microsoft Windows (WinXP SP2)
Assigned to: CPU Architecture:Any

[6 Sep 2006 8:19] Praveen Kumar
Description:
When i try to execute the following to create a view named vPlace

create VIEW vPlace as (select id,name,ict from tiea union all select id,name,ict from tieb union all select id,name,ict from tiec union all 
select id,name,ict from tied)

i get the following error,

Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'union all select id,name,ict from tieb union all select geo,' at line 1
(0 ms taken)

How to repeat:
create any view with multiple unions
[6 Sep 2006 9:39] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

This bug duplicates bug #21614
[6 Sep 2006 9:50] Praveen Kumar
Can anyone plese chk the sql statement and suggest if anything needs to be altered....