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

G

Guest

I'm trying to find out how to enter inline comments in a query. For example,
If I:
1) click on "Queries" under "Objects".
2) Click on "Create query in Design view".
3) Under the "Tables" tab, click MyTable.
4) Click the "Add" button.
5) Click the "Close" button.
6) Drag the the "*" to the first field.
7) Click "View".
8) Click "SQL View".
I will see:
SELECT MyTable.*
FROM MyTable;

I want to ad something like:
/* My comment */
SELECT MyTable.*
FROM MyTable;

I tried:
//
'
--
#
{}
SQL-comment
C-comment

I know how to add a comment in the description property, but inline comments
would really help me. Does anyone have any suggestions?

Thanks,
Mark Nelson
 
L

Lynn Trapp

Mark,
You and about 10,000 other Access developers would like to have that
functionality, but it is not available.
 
D

david epsom dot com dot au

Or,

SELECT MyTable.*,"my table contains my data" as myComment
FROM MyTable;


Mostly just irritating, but sometimes it's actually useful
to have your comments come out as a query field:

SELECT Myquery1.*,"MyQuery2," & MyQuery1.MyComment as myComment
FROM Myquery1;

(david)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top