Topic
  • 1 reply
  • Latest Post - ‏2013-02-02T09:25:10Z by B.Hauser
Archanaa
Archanaa
7 Posts

Pinned topic Create view issues

‏2013-02-01T00:26:39Z |
Hi,
I am trying to build a view which has 33 columns in it. Basically I am using 3 views as a source of which 1 view is used 6 times and the other view is used 5 times which in total makes it as 12 sources.

When I tried to execute the create script, I got the below error message:

SQL State: 54004
Vendor Code: -129
Message: SQL0129 Too many tables in SQL statement. Cause . . . . . : The SQL statement contains too many tables or views. A single SQL statement can refer to a maximum of 1000 tables or views. A CREATE TABLE AS or a CREATE VIEW statement can only refer to 256 tables. This number includes the base tables of a view. Recovery . . . : Do one of the following and try the request again: -- Split the SQL statement into two or more simpler statements with a maximum of 1000 tables in each. -- If this is a CREATE VIEW or CREATE TABLE AS statement, reduce the number of tables to a maximum of 256.

Any thoughts??

Thanks in Advance
Updated on 2013-02-02T09:25:10Z at 2013-02-02T09:25:10Z by B.Hauser
  • B.Hauser
    B.Hauser
    255 Posts

    Re: Create view issues

    ‏2013-02-02T09:25:10Z  
    Could you please show the (simplified) SQL statement of your CREATE VIEW statement
    ... also the CREATE VIEW statement for the views you want to join.

    The form clause (or all clauses where those views are specified) are interesting.

    I use views very extensively, join them together (in other views) and built views over views (sometimes up to 10 levels) and never had any problem.

    Birgitta