Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Dec 2001
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SQL Comments (Access 2003)

    Dear Friends, How does one add comments/remarks for readability and documentation to a Query containing SQL statements? I tried -- / {} // but nothing works. Thank you.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: SQL Comments (Access 2003)

    Jet SQL (the dialect of SQL used by Access) does not allow comments. You can add a short description to a query by selecting the query in the database window and selecting View | Properties, or, equivalently, by opening the query in design view, clicking in an empty part of the upper half of the query design window and selecting View | Properties. The latter possibility is not available, of course, for queries that cannot be displayed in design view, such as union queries.

    Note: there are other dialects of SQL that do allow comments, for example in the form
    /* comment text */
    or
    -- comment text

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: SQL Comments (Access 2003)

    Just a minor addition to what Hans said:<UL><LI>There is an option to use ANSI 92 (SQL Server compatible) Syntax which does allow comments (but has many other issues in Access).[/list]
    Wendell

  4. #4
    Lounger
    Join Date
    Dec 2001
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SQL Comments (Access 2003)

    Sorry for this belated acknowledgement. Thank you for your response.

Posting Permissions

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