Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004

    Unanswered: help I need to know...

    I currently am trying (operative word here is "trying") to design a form that I can use with a database which contains over 30 tables of information.

    However, I'm stuck as to how to design a query that can check all the tables and come back with any duplicates. Also, I am trying to write a query that can append a new record. Can someone help? I know I should know this, but I'm just learning.

    Thanks so much.


  2. #2
    Join Date
    Jul 2004
    Dundee, Scotland
    this might help...

    to find a duplicate row in a table use something like:
    SELECT field_name FROM `table_name` GROUP BY field_name HAVING count(*) > 1

    ...perhaps you might repeat that check for each table in a loop?

    to insert (append) a row into a table use something like:
    INSERT INTO `table_name` (`field1`, `field2`) VALUES ('value1', 'value2' )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts