[thelist] Weird SELECT DISTINCT error

Brian Cummiskey Brian at hondaswap.com
Thu Dec 15 15:12:49 CST 2005


Casey wrote:
  The ONLY difference between the first and second is
> the inclusion of "opp_id," - which should not make a lick  of difference. 
> Right?

Wrong.

In the second, you're selecting the distinct property on opp_id, not 
policy_name.

My guess is that you need to quote the values.  ASP is retarded like 
that.  It's an int in sql, but in asp, if its passed in dymanically, it 
assumes it to be a varchar.

so, try this:

SELECT DISTINCT policy_name FROM vwOpp_with_Sale WHERE producer_id = 
'329' AND active_code = '1'





More information about the thelist mailing list