[thelist] Weird SELECT DISTINCT error
Casey
aspnet at thecrookstons.com
Thu Dec 15 14:39:16 CST 2005
This is odd. If I use this query:
SELECT DISTINCT policy_name FROM vwOpp_with_Sale WHERE producer_id = 329 AND
active_code = 1
Then I am told "Item cannot be found in the collection corresponding to the
requested name or ordinal."
But if I use this query:
SELECT DISTINCT opp_id,policy_name FROM vwOpp_with_Sale WHERE producer_id =
329 AND active_code = 1
Then the query executes just fine. What's more, if I execute the first
query directly at the table within SQL's Enterprise Manager, it works just
fine. What gives here? The ONLY difference between the first and second is
the inclusion of "opp_id," - which should not make a lick of difference.
Right?
Classic ASP with MS SQL.
Thanks,
Casey
More information about the thelist
mailing list