Comment Lines in MS Access SQL

Discussion in 'Microsoft Access Queries' started by Don_G, Aug 17, 2007.

  1. Don_G

    Don_G Guest

    I am writing SQL statements in MS Access 2000. I would like to "comment
    out" a statement.

    /* sql stmt */ does not work.

    Preceeding the line with -- (two dashes) does not work either. How can I
    "comment out" an SQL statement?

    (If you prefer to reply to my e-mail remove NOSPAM from the return address.)
     
    Don_G, Aug 17, 2007
    #1
    1. Advertisements

  2. Don_G

    Guest Guest

    You can't. Neither can you highlight the part you want to execute.
    Save the SQL in a text file with comments if you need to.

    -Dorian

    "Don_G" wrote:

    > I am writing SQL statements in MS Access 2000. I would like to "comment
    > out" a statement.
    >
    > /* sql stmt */ does not work.
    >
    > Preceeding the line with -- (two dashes) does not work either. How can I
    > "comment out" an SQL statement?
    >
    > (If you prefer to reply to my e-mail remove NOSPAM from the return address.)
    >
    >
    >
     
    Guest, Aug 17, 2007
    #2
    1. Advertisements

  3. Don_G

    Guest Guest

    Oh wouldn't that be nice! I do it all the time with Oracle.

    I believe that there was a discussion about it around a year ago. There were
    some convoluted ways of doing it, but none were easy or practical. So in a
    nutshell, not in Access.
    --
    Jerry Whittle, Microsoft Access MVP
    Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

    "Don_G" wrote:

    > I am writing SQL statements in MS Access 2000. I would like to "comment
    > out" a statement.
    >
    > /* sql stmt */ does not work.
    >
    > Preceeding the line with -- (two dashes) does not work either. How can I
    > "comment out" an SQL statement?
    >
    > (If you prefer to reply to my e-mail remove NOSPAM from the return address.)
     
    Guest, Aug 17, 2007
    #3
  4. On 17 Aug, 15:04, "Don_G" <> wrote:
    > I am writing SQL statements in MS Access 2000. I would like to "comment
    > out" a statement.
    >
    > /* sql stmt */ does not work.
    >
    > Preceeding the line with -- (two dashes) does not work either. How can I
    > "comment out" an SQL statement?
    >
    > (If you prefer to reply to my e-mail remove NOSPAM from the return address.)


    Access/Jet SQL has no syntax for comments :(

    Jamie.

    --
     
    Jamie Collins, Aug 20, 2007
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Hag

    How do I comment SQL in a DB2 passthrough query

    Jeff Hag, Apr 12, 2004, in forum: Microsoft Access Queries
    Replies:
    2
    Views:
    1,676
    dhiru
    Jul 24, 2012
  2. David Perkins

    Is Access SQL FROM Clause different from MS SQL Server SQL?

    David Perkins, Oct 20, 2004, in forum: Microsoft Access Queries
    Replies:
    1
    Views:
    750
    Tom Ellison
    Oct 20, 2004
  3. Guest

    How do I add an inline comment to an SQL query?

    Guest, Dec 9, 2004, in forum: Microsoft Access Queries
    Replies:
    4
    Views:
    6,174
    Lynn Trapp
    Dec 10, 2004
  4. Magne Ryholt

    SQL comment syntax

    Magne Ryholt, Jan 16, 2005, in forum: Microsoft Access Queries
    Replies:
    1
    Views:
    6,481
    Douglas J. Steele
    Jan 16, 2005
  5. Guest
    Replies:
    2
    Views:
    2,018
    MGFoster
    Mar 22, 2005
  6. Guest

    Can I enter comment lines in Expressions, etc....

    Guest, May 12, 2005, in forum: Microsoft Access Queries
    Replies:
    1
    Views:
    291
    Douglas J. Steele
    May 12, 2005
  7. Guest

    Can I put a comment in SQL code of an Access Query, how?

    Guest, Oct 27, 2006, in forum: Microsoft Access Queries
    Replies:
    1
    Views:
    1,279
    John Vinson
    Oct 27, 2006
  8. Bill Edwards

    Re: comment on columns in tables ( ACCESS / SQL )

    Bill Edwards, Jan 5, 2007, in forum: Microsoft Access Queries
    Replies:
    0
    Views:
    560
    Bill Edwards
    Jan 5, 2007
Loading...