sql strange, VSTUDIO and V4MD 4.3

Christian - ChrisKatDev.com christian at chriskatdev.com
Sun Jun 13 09:28:18 CDT 2010


ok only in Director...

but I have other problem :

I have, for example, 

"select recID, scrap from tableScrap where recID IN (7, 23, 1)"

but I want records IN ORDER of "IN" : 7, 23, 1 and not 1, 7, 23

do you have a solution ?

br
Christian

Le 13 juin 2010 à 14:16, Christian - ChrisKatDev.com a écrit :

> Hello Ivan,
> 
> 
> In VS it seems ok
> 
> I try in Director now
> 
> br
> Christian
> 
> Le 9 juin 2010 à 16:36, Ivan Smahin a écrit :
> 
>> Hello Christian,
>> 
>> Wednesday, June 9, 2010, 5:13:42 PM, you wrote:
>> 
>> 
>> 
>>> BTW the workaround is -
>> 
>>> Group all the records you want and sum pertinence.
>>> Something like this:
>> 
>>> SELECT
>>>      idScrap, 
>>>      SUM(pertinence) as s 
>>> FROM 
>>>      kw_in_scrap
>>> WHERE 
>>>              kw = 'musique' 
>>>      OR  kw = 'cuivre' 
>>> GROUP BY
>>>      idScrap
>>> ORDER BY 
>>>      s DESC             
>> 
>> 
>>> This request doesn't match what I'm expecting for.
>> 
>>> In fact, I want to find idscrap which has kw1 AND kw2 and I want to
>>> have the addition of pertinence of kw1 and pertinence of kw2 for this idscrap.
>>> I don't want idscrap which has only one of the kw and I don't want the global sum of pertinence.
>>> 
>> 
>> ok - another workaround is:
>> 
>> select idScrap, a1+a2
>> from
>> (       
>> SELECT 
>>       t1.idScrap, 
>>       t1.pertinence a1,
>>       t2.pertinence a2
>> FROM 
>>       kw_in_scrap as t1, 
>>       kw_in_scrap as t2 
>> WHERE 
>>               t1.kw = 'musique' 
>>       and t2.kw = 'cuivre' 
>>       and t1.idScrap = t2.idScrap
>> )
>> ORDER BY 
>>       2 DESC                                                  
>> 
>> 
>> 
>> 
>> 
>> -- 
>> Best regards,
>> Ivan Smahin 
>> Senior Software Engineer
>> Paradigma Software, Inc
>> Valentina - The Ultra-Fast Database
>> http://www.valentina-db.com
>> 
>> _______________________________________________
>> Valentina mailing list
>> Valentina at lists.macserve.net
>> http://lists.macserve.net/mailman/listinfo/valentina
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list