cancel
Showing results for 
Search instead for 
Did you mean: 

Error 540 Schema for table '%.*s' has changed since compilation of this query.

Former Member
0 Kudos
5,647

I have encountered a problem when running a SQL where A is a VIEW and B is a table.

SELECT * FROM A INNER JOIN B ON A.ID = B.ID AND A.UID = B.UID AND A.REFERENCE = B.REFERENCE AND A.STATUS = B.STATUS AND .....

The SQL has many AND clause and once when i add one more AND clause in the SQL. It returns the error "Schema for table 'C' has changed since compilation of this query. Please re-execute query." The table C is a table which is using in the VIEW A. When I re-execute the query, the error happens again. When i remove one of the AND clause such as "AND A.REFERENCE = B.REFERENCE". The SQL can run without problem. Please help. Many Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Breck_Carter
Participant

Bad news: You are asking a question about Adaptive Server Enterprise, and this is a forum for SQL Anywhere... both Sybase products but vastly different.

Good news: Have a look at this page... well, maybe you already have looked at that page... sorry, but it's all I've got... this is one of the (many) reasons people use SQL Anywhere.

Former Member
0 Kudos

Hi, but no matter how many time i re-execute, the error message is still existed. And i will move this post to Adaptive Server Enterprise. Sorry for posting in wrong forum.

Breck_Carter
Participant
0 Kudos

Try dropping and recreating the view... that's just a guess, but it's the weekend.

Former Member
0 Kudos

I will try in weekday. Thank you for your help.