Reply to Re: Where Not Exists

Your name:

Reply:


Posted by Stefan Rybacki on 11/23/05 18:09

Chris Thompson wrote:
> Hi All,
>
> I'm trying to work out how to change the following mysql statement which
> inserts rows from one table into another. I want to ensure that it does
> *not* insert rows if an exact match of the row already exists on the table.
>
> I've tried to use WHILE NOT EXISTS, but I can't seem to get the syntax
> right... can anyone help please?
>
>
> INSERT INTO Contacts SELECT DISTINCT null as
> ID,CustName,Company,TelNo,Email,Mobile,Web,Address FROM ConTemp
>
> (It works as is, but causes duplicate rows).

Create an unique index over
CustName,Company,TelNo,Email,Mobile,Web,Address

Regards
Stefan

>
> Thanks in advance of any assistance...,
>
> Chris.
>
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация