Dear Ivan,

I am full of admiration for your huge number of left joins in this
query! :-)

Looks quite funny to me how a SELECT can produce an error that you would
expect from an INSERT query. Anyway, try to type this query into a
multi-line command line (MySQL Monitor, the command line tool), and *do*
use more than one line for your statement! This should at least give you
(and us from the mailing list) a closer hint as to where exactly the
error occurs!

Regards,

Stefan Hinz (Geschäftsleitung)
iConnect e-commerce solutions GmbH
www.iConnect.de - www.js-webShop.de
TEL +49 30 46307-382 - FAX -388
 ---
----- Original Message -----
From: Ivan Lulukyan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 05, 2001 6:28 PM
Subject: Duplicate entry for SELECT query


> Hi All.
> Strange thing.The query below:
>
> select concat(domain,path,file) as url, title, '' as blank1, docdate,
size,
> date as lastmod, 'keywords' as keyw, description as descr, a.ID,
sum((word
> like 'acc')) as r, ( sum(word like 'acc')) as qu, f.ID, author,
> class,charset,lang,'content' as content, count(*) as suma from words
as w
> left join aname_word as aw on w.ID=aw.wordID left join anames as a on
> a.ID=aw.anameID left join files as f on f.ID=a.fileID left join paths
as p
> on p.ID=f.pathID left join domains as d on d.ID=p.domainID left join
> file_names as fn on fn.ID=f.file_nameID left join path_names as pn on
> pn.ID=p.path_nameID left join charsets as c on c.ID=f.charsetID left
join
> classes as l on l.fileID=f.ID left join class_names as ln on
ln.ID=l.classID
> where ((word like 'acc')) group by f.ID having qu>0 order by r desc
>
> answer me with
>
> ERROR 1062 at line 1: Duplicate entry '4783' for key 1
>
> How can it be?
>
> Regards,
>
> Ivan Lulukyan
> ACC
> Armenia
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to