How to comment out lines of a query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    How to comment out lines of a query

    Does anybody know the syntax for commenting out lines of code in SQL View in Access Query Design?
    Also how to only run one query or part of a query in SQL View when you may have 2-3 that you are playing with?

    For example I can do the above in SQL Query Analyzer by
    -- to comment out
    and highlighting the query or part I wish to run
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Hi code green. As far as I know Access can't do either of the things you mention. There is no provision for commenting or annotating SQL statements in SQL view at all, nor does it allow multiple SQL queries while you work on them.

    The SQL view shows what really goes on under the Design View grid editor, and is bound to the SQL property of the underlying DAO QueryDef object that stores the properties for the query, hence it cannot deal with multiple independent SQL statements (other than the ones being joined or subqueried within the current QueryDef).

    Sorry.

    -Stewart

    Comment

    Working...