Commenting in SQL

V

VWP1

Is there any "comment" characters I can use in SQL which will be ignored,
similar to HTML's <!-- comment --> ?

VWP1
 
J

Jerry Whittle

Unfortunately not in Access. I have heard of some comvoluted workarounds such
as running the SQL in code where you can make it happen.
 
J

John W. Vinson

Is there any "comment" characters I can use in SQL which will be ignored,
similar to HTML's <!-- comment --> ?

VWP1

We've been yelling at MS for years to add this feature, but... at present, no.

About all you can do is a snarky getaround: creating a phony calculated field,
e.g.

SELECT "This isn't a real field, just a comment" AS IgnoreThis, <other fields>
FROM mytable...
 
A

Albert D. Kallal

John W. Vinson said:
We've been yelling at MS for years to add this feature, but... at present,
no.

Yes, come to think of it is something I've been forgetting to yell about!

About all you can do is a snarky getaround: creating a phony calculated
field,
e.g.

SELECT "This isn't a real field, just a comment" AS IgnoreThis, <other
fields>
FROM mytable...

Well, at least I can say I'm very proud of you, since you've added the word
snarky to above statement.
(no question, the above is a last chance saloon type of solution).
 
Top