Sunday 15 July 2012

sql - Query driving a view and actual view not returning same results -


I have a view that is returning four columns of data that can be pushed to external programs. When I only query the view ("select schema. With Visiting_name *") I get 10353 rows, when I run the actual SQL, I created the scene (I literally imitated and pasted what Oracle had stored, at least " Create or Replace "statement), I get 238745 rows.

Any idea why this can happen? Best guess: When you run the query standalone you are not seeing it in the same schema created in

SELECT ). The schema where you are running a query is either the name of one of the base tables in your table, or one of the names in the synonyms that has another view in which only one sub-group of rows is built-in Table


No comments:

Post a Comment