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.
Thanks in Advance
B.Hauser 1000007U1D268 Posts
Re: Create view issues2013-02-02T09:25:10ZThis is the accepted answer. This is the accepted answer.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.