• Correct syntax for checkbox in SQL tables

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Correct syntax for checkbox in SQL tables

    Author
    Topic
    #463911

    Hi,

    I’ve got an Access database linked to sql tables. There is a checkbox named [OT] that has null values that I want marked as False. I’m trying to do an update so that all null fields are marked as false. No matter what I enter as the “new value” in the field to update in the query, I get an error. What is the correct syntax to do this in SQL?

    Thanks!
    Leesha

    Viewing 0 reply threads
    Author
    Replies
    • #1185701

      Hi,

      I’ve got an Access database linked to sql tables. There is a checkbox named [OT] that has null values that I want marked as False. I’m trying to do an update so that all null fields are marked as false. No matter what I enter as the “new value” in the field to update in the query, I get an error. What is the correct syntax to do this in SQL?

      Thanks!
      Leesha

      What is the error?

      What is the SQL of the query?

      Is this field a new field in the SQL table? Is it a bit field? If so, you need to run the update query (I presume that’s what you are doing) in SQL Server and not in Access.

      You will also have to set the default to 0 (zero) in Sql Server table design.

      • #1185719

        >>You will also have to set the default to 0 (zero) in Sql Server table design.

        Thanks Pat! This is the info I needed. The zero was the key!!!

        Leesha

    Viewing 0 reply threads
    Reply To: Correct syntax for checkbox in SQL tables

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

    Your information: