[thelist] Weird SELECT DISTINCT error

Asif Suria asifsuria at yahoo.com
Thu Dec 15 15:11:44 CST 2005


I get the feeling you are executing against the wrong
database. Check the database and try again. 

Asif

--------------------------------------------
Blog -> http://www.sinletter.com/ablog.aspx
--------------------------------------------

--- Casey <aspnet at thecrookstons.com> wrote:

> 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 
> 
> -- 
> 
> * * Please support the community that supports you. 
> * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip
> Harvester 
> and archives of thelist go to:
> http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the thelist mailing list