Hi!
It;s been a while since i used Access, so i can't remember exactly
what you mean. But for what you've said you probably have three
choises:
1) Create a primary key, try to insert a record with already
existing
key and fail. Failure means that record already exists. Nothing
special.
2) Do SELECT-INSERT pair (that what you are trying to avoid)
3) use REPLACE to force re-insert of the same data (that probably
you do not want to do).
Since i don't know your case you even might want to look at
INSERT .. FROM ... sql command. Maybe it is what you need.
Also, you might want to have a table holding UNIQUE ids so
every inserted record is unique.
Mayways, depends on what EXACTLY you want.
Describe your case better.
Regards,
Artem
----- Original Message -----
From: "Dave Carter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 19, 2001 9:36 PM
Subject: Advice needed....
> I'm converting an Access db to mySQL, and Access allows users to
Insert
> Records into a table AND call them as well in the FROM clause. This
is
> illeagal in ANSI SQL however and therefore illeagal in mySQL, but I
don't
> know really how to get around it. How can I insert only new records
that
> aren't already in a table, without calling the table first? Can this
be done
> in SQL?
>
> Dave Carter
> Chief Web Architect
> Accelerated Business Technologies, Inc.
> http://www.abti.cc
> 717.464.2970
>
>
> --------------------------------------------------------------------
-
> 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