On Sat, 19 May 2001, Dave Carter wrote:

> 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?

But you're not working only with SQL, are you? Like
transactions or foreign keys, you can easily do this
in your middleware, whatever that might be (PHP, Perl,
Coldfusion, whatever). Select first, then check to see
if it's there, and if it isn't, insert it. A simple
if-statement will do the job, so what's the problem?

--
 /"\
 \ /    ASCII RIBBON CAMPAIGN
  X     AGAINST HTML EMAIL
 / \    AND POSTINGS


---------------------------------------------------------------------
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