Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2011
    Miami, Florida

    Unanswered: Remove all data from Column without deleting field


    I had a default value of "1" in a field and this populated all 10000+ records.
    I have now removed this value as it is not needed but the specific field (column) is populated with "1". If I try and delete it states that it will remove the field and data.
    Is there a way just to remove all the data from that one field (column)?


  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    run some SQL
    update mytable set mycolumn = <avalue> where mycolumn = 1;

    <avalue> could be NULL
    update mytable set mycolumn = NULL where mycolumn = 1;

    to run this you need to open the query designer
    seelct the SQL view (button top left underr 'file'
    then paste the above SQL
    change mytable for the name of your table containing the column
    change mycolumn for the name of the column in the table

    execute the SQL

    if this is the first time you have done such things then take a backup of the table first, ideally work on that backup, then copy the corrected table over the original or apply the same changes to the original table.. your choice
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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