Simple update statement won't work on a particular column

Posted on 2009-04-22
Last Modified: 2012-05-06
I have an update query that I'm trying to implement. It just won't work. (It's not exactly the query below but I'm just trying that in order to try and get a simple query to work)

So, I'm trying to update the column Password below. Doesn't work. However, if I try and update the column Team (simply substitute Password for Team) and it works fine. So, everything is fine except that the column Password just won't update (the error message is that there is an error in the syntax of the sql query... which can't be since the column Team works just fine)

So, I've looked at the columns and I can't see any reason why this would be happening. Just to be on the safe side I filled the password with the same info as in the team column and set all the properties of the password column to the same as the team column... still doesn't work?

Any ideas?
MySQL = "UPDATE `User Information`"

MySQL = MySQL + " SET Password = NULL"

Open in new window

Question by:AidenA
    LVL 7

    Expert Comment

    Use [User Information] instead of `User Information`
    LVL 14

    Accepted Solution

    Can you try this

    MySQL = "UPDATE `User Information`"
    MySQL = MySQL + " SET [Password] = NULL"


    Author Comment

    Hi thanks,

    John, your version worked... why is that? I know I've done other queries where I did not need the brackets... (the one with the column Team being a recent example!). Why with this particular column?

    LVL 59

    Expert Comment

    by:Kevin Cross
    Password is a reserved word, so you have to tell SQL it is column in this case.
    LVL 14

    Expert Comment

    Yep!!!. mwvisa1 is correct. All the reserved words should be included with [] in sql queries.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now