[thelist] Weird SELECT DISTINCT error

Luther, Ron Ron.Luther at hp.com
Fri Dec 16 08:46:35 CST 2005


Matt Warden pointed out that I misread his earlier message:

>>Yes, of course. The stuff that you replaced with a '...' 
>>gives the appropriate context to what I was saying:

>>"Actually, you are selecting unique combinations of opp_id 
>>and policy_name. If you think about it, since results are 
>>returned in rows, it is difficult to see how DISTINCT could 
>>operate on only one column."


Hi Matt,

Ooops.  Sorry.  My bad.  I misread that.  (Yeah, that 
seemed kinda weird coming from you, but <shrug />, 
not everybody plays with every odd little db command 
all the time.)  No slight intended.


Contritely,

RonL.


<tip type="reading carefully" author="RonL.">

Reading carefully isn't just for email.

Sometimes we make assumptions about how a command works 
in technology 'e' because we are so familiar with how 
it works in 'a', 'b', 'c', and 'd'.

Yesterday I ran into trouble writing an equation to 
compute the number of 'working days' between two 
arbitrary dates.

I was working in the ZABO flavor of Business Objects 
and discovered, (much to my annoyance), that in this 
technology the "Min()" function can _only_ be used 
as an aggregate function operating on an entire 
field of entries ... and cannot be used in the 
(relatively common) row level contexts of 
'Min(field_1, field_2)' or 'Min(field_1, constant).

Realizing this earlier would have prevented much wasted 
time experimenting with 'elegant' solutions.

</tip>



More information about the thelist mailing list