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. 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:
    453
    Tom Ellison
    Oct 20, 2004
  2. Guest
    Replies:
    2
    Views:
    1,617
    MGFoster
    Mar 22, 2005
  3. Guest

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

    Guest, May 12, 2005, in forum: Microsoft Access Queries
    Replies:
    1
    Views:
    206
    Douglas J. Steele
    May 12, 2005
  4. 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,089
    John Vinson
    Oct 27, 2006
  5. Bill Edwards

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

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

Share This Page