Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    139

    Unanswered: Update query that updates to clear content

    I would like to create an update query that will pull up a specific records with criteria and then update a field. However, I want the update to clear out of the contents of that field. I have tried putting "" in the update field and this does not work. I was assuming that the astericks with nothing in between would say put blank in this field. Obviously, I was wrong.

    Does anybody have an idea here?

    Thanks for your help.
    B&R

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    what are the details of the field you want to clear?
    datatype?
    nulls, empty allowed?
    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Feb 2004
    Posts
    139
    izy - Thanks for responding. It is a text field (serial#) and the critieria will only pick field with data. I then want to clear the serial# field of the data.

    Hope this help,
    B&R

  4. #4
    Join Date
    Oct 2003
    Posts
    21
    Use the word null (no quotes around it)

    Update sometable set somefield = Null where.......

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    is the field set to
    Allow Zero Length
    in table design?

    izy
    currently using SS 2008R2

  6. #6
    Join Date
    Feb 2004
    Posts
    139
    The field is set to allow zero lengths. I tried putting null in the update field and it worked perfectly!!

    Thanks so much for the prompt and accurate response.

    B&R

Posting Permissions

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