When you define a view, Adaptive Server verifies that all the tables or views listed in the from clause exist. Similar checks are performed when you query through the view.
Between the time a view is defined and the time it is used in a statement, things can change. For example, one or more of the tables or views listed in the from clause of the view definition may have been dropped. Or one or more of the columns listed in the select clause of the view definition may have been renamed.
To fully resolve a view, Adaptive Server verifies that:
All the tables, views, and columns from which the view was derived still exist.
The datatype of each column on which a view column depends has not been changed to an incompatible type.
If the statement is an update, insert, or delete, it does not violate the restrictions on modifying views. These are discussed under “Modifying data through views”.
If any of these checks fails, Adaptive Server issues an error message.
Copyright © 2005. Sybase Inc. All rights reserved. |