• keeping table values unique (off 97)

    Author
    Topic
    #373001

    hello all i am sure this is a simple question. i have a table that gets its data impported daily. as a result some of the data is often repeated. i have a query that finds all unique values within that table. i would like to take the results of my query and use them to create a cleaner tbale. i would run the query. delete the old table. then copy the query data to a table that had the same name as the one i just deleted. all i want to do is cleanse to keep the file size down. is this possible?

    Ed

    Viewing 1 reply thread
    Author
    Replies
    • #597940

      Try turning your query that selects the unique records into a “Make Table” query. Unfortunately, Access doesn’t let you use the same table as both the source (the queried table) and destination (the “made” table), so you may have to delete your old table and rename your new table — or you could use a second Make Table query to replace the old table with a copy of the new one.

      Hope this helps.

    • #597956

      You could introduce another field (Yes/No) in the table, and set this field to Yes if the field is unique via an update query.
      Using a delete query, delete those entries where the field is not Yes.

      That would not work, Tom’s idea is better.

      HTH
      Pat

    Viewing 1 reply thread
    Reply To: keeping table values unique (off 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: