Query giving unexpected results.

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Sep 10 19:10:28 CDT 2004


On 9/10/04 6:28 PM, "Bill Numerick" <bnumerick at gmail.com> wrote:

Hi Bill,

> I am using the query below  to return a set of results from a data.
> 
> SELECT * WHERE model.id = '37' AND  model.id =
> model_optional_feature.model_id  AND optional_feature.id not in
> (16,17,18,20,21,56,99,163,203,204,242)  AND
> model_optional_feature.optional_feature_id = optional_feature.id AND
> optional_feature.of_type = 'Exteriors' ORDER BY optional_feature.name
> ASC

Try such edition:


SELECT *

  <<<<< where is FROM clause ??????


WHERE 
    (model.id = model_optional_feature.model_id
    AND model_optional_feature.optional_feature_id = optional_feature.id)
 AND 
    (model.id = '37'
    AND optional_feature.of_type = 'Exteriors'
    AND NOT optional_feature.id in (16,17,18,20,21,56,99,163,203,204,242) )

ORDER BY 
    optional_feature.name ASC




> and it does not seem to exclude optional_feature.id not in
> (16,17,18,20,21,56,99,163,203,204,242) from the list.


> I got this query is coming from the website that uses a mySql database and it
> works perfect there.

> I've tried doing individual optional_feature.id
> <>16 AND ... through all of the id's but that gets the same results.

> Any work around?  There are quite a few queries like this so i'm
> trying to make it so i don't have to go back and rewrite all of them,
> sql support was the main reason we choose to use Valentina in the
> first place from V-12 and if i have to rewrite everything it kind of
> defeats the purpose.

Not worry, just Valentina 1.x is a little sensitive to order of conditions.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list