SQL RB AND VS

Bart Pietercil bart.pietercil at cognosis.be
Sat Feb 25 08:39:48 CST 2012


The parser doesn't understand (neither do I) why you would want to do an order by within a subselect when the subselect is used in combination with the in() keyword.   
I think your query should read:

> delete from dicowords where recid in (select recid from dicowords where reciddictionary = 4 )
delete from dicowords where recid in (select recid from dicowords where reciddictionary = 4 limit 1000). I am not sure that the limit clause will be accepted

hth   

--  
Bart Pietercil
CTO Cognosis NV
Dorpstraat 28
3560 Lummen


On Saturday 25 February 2012 at 15:32, Christian - ChrisKatDev.com wrote:

> Hi Ruslan,
>  
> I have 500,0000 record in database.
> Where I want delete without limit, I have a crash (database diagnose : ok)
>  
> I have tried :
> > >  
> >  
> >  
>  
> delete from dicowords where recid in (select recid from dicowords where reciddictionary = 4 ORDER BY recid limit 1000)
>  
>  
>  
>  but I have this error...
> 15:28:50 Kernel error: 0x71000. line 1:93: expecting ')', found 'ORDER'
>  
>  
> ??
>  
> Christian
>  
> Le 25 févr. 2012 à 15:03, Ruslan Zasukhin a écrit :
> > On 2/25/12 3:13 PM, "Christian - ChrisKatDev.com (http://ChrisKatDev.com)"
> > <christian at chriskatdev.com (mailto:christian at chriskatdev.com)> wrote:
> >  
> > > hello,
> > >  
> > > why this request don't work :
> > > delete from dicowords where recid in (select recid from dicowords where
> > > reciddictionary = 4 limit 1000)
> >  
> > You want delete ANY  first 1000 records?
> >  
> > ANY because you not specify ORDER BY ... So you can get random records in
> > this set ...
> >  
> > Well, I'd say - first 1000 records in their physical order in table ...
> >  
> >  
> > --  
> > Best regards,
> >  
> > Ruslan Zasukhin
> > VP Engineering and New Technology
> > Paradigma Software, Inc
> >  
> > Valentina - Joining Worlds of Information
> > http://www.paradigmasoft.com
> >  
> > [I feel the need: the need for speed]
> >  
> >  
> > _______________________________________________
> > Valentina mailing list
> > Valentina at lists.macserve.net (mailto:Valentina at lists.macserve.net)
> > http://lists.macserve.net/mailman/listinfo/valentina
>  
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net (mailto:Valentina at lists.macserve.net)
> http://lists.macserve.net/mailman/listinfo/valentina
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20120225/042c1ca7/attachment.html>


More information about the Valentina mailing list