V4MD 4.5

Steve Albin steve at steve-albin.com
Fri Feb 19 14:48:32 CST 2010


On 2/19/10 at 3:41 PM, ruslan_zasukhin at valentina-db.com (Ruslan 
Zasukhin) wrote:

>On 2/19/10 9:52 PM, "Steve Albin" <steve at steve-albin.com> wrote:
>
>>> This query returns the same 15 records without errors
>>>   SELECT DISTINCT _type_album.recID, concat (width, '*', 
>>>height) as
>>> 'dimensions'
>>> FROM _type_album, _jonction_album
>>> WHERE (activation = TRUE AND idAlbum = _type_album.recID)
>>> ORDER BY _type_album.recID
>>>  
>>
>>Last October, I reported a problem with SQL (Mantis id #
>>0004601) where I was not including the order by field in the
>>result table.  I was told that this was not allowed according to
>>SQL standards.  So, if that is the case, why is it not obvious
>>that Christian's SQL is just incorrect?  Which is it?  Do we
>>need to have the order by field in the result table or not?  Am
>>I missing something?
>
>I not remember from head, we will ask Ivan tomorrow.
>
>May be for single table we have enable this "non-standard" feature.
>For join may be no.
>
>I just not remember.

It may be as you say, single table queries will work.  Before I 
submitted my Mantis report, I would get  unpredictable results 
when not including the ORDER BY field in the result table - 
maybe I never noticed that it only worked in the single table 
queries.  At any rate, I now always include all fields I 
reference in the ORDER BY and stop worrying about it.  
Christian's original SQLs did not have the ORDER BY in the 
result table and so I wondered...

Thanks,
Steve



-- 
Steve Albin - Montclair, NJ
http://www.jazzdiscography.com/
http://www.steve-albin.com/



More information about the Valentina mailing list