sql server 2000 - SQL query, view joined to table - number of results inconsistent -
apologies in advance vagueness of question, involves query big describe in full, , field/table names can't reveal. i'm not expecting solution, if give advice on how proceed in solving myself, i'd grateful.
sql server 2000.
i have query joins view , table inner join , has clause:
select view.join_field view inner join table on view.join_field=table.join_field table.other_field='ee' # (23 rows) this produces 23 results (it should 1000s). if add clause above query, more results, instead of less:
select view.join_field view inner join table on view.join_field=table.join_field table.other_field='ee' , view.field2=1 this gives me few thousand results, expected. changing value 2 or 3 (the other values present) gives me thousands of results each, if change view.field2 in (1,2,3) end 38 results.
going original query, gave me 23 results, if add table field have in clause select block, right number of results:
select view.join_field, table.other_field view inner join table on view.join_field=table.join_field table.other_field='ee' # (8764 rows) if instead use clause of table.other_field='gg' (the other value present in table), none of these strange things happen, , expected number of results.
if select contents of view temporary table, , use in query, thousands of rows expecting.
view left outer join of view , 2 other tables. table, in query, not involved in of views.
can give me vaguest of ideas of what's going on? tables or views corrupt, somehow?
Comments
Post a Comment