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.

asked 23 Jul '11, 05:49

Sybase%20beginner's gravatar image

Sybase beginner
0112
accept rate: 0%

edited 23 Jul '11, 17:18

Volker%20Barth's gravatar image

Volker Barth
30.0k294448654


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.

permanent link

answered 23 Jul '11, 06:07

Breck%20Carter's gravatar image

Breck Carter
27.4k424585837
accept rate: 21%

edited 23 Jul '11, 06:11

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.

(23 Jul '11, 06:11) Sybase beginner
Replies hidden

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

(23 Jul '11, 06:13) Breck Carter

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

(23 Jul '11, 06:16) Sybase beginner
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×85
×48

question asked: 23 Jul '11, 05:49

question was seen: 2,887 times

last updated: 23 Jul '11, 17:18