0

I am trying to figure out how to put in line comments in Access. I have seen the below post and have been trying to put through the solution from Dan which includes the WHERE Clause however it comes up with a "Syntax error (missing operator) in query expression AND "Comment FYI, This is a comment"<>"".

Script I have put through below for reference:

SELECT prod_name 
FROM products
WHERE
AND "Comment: FYI, This is a comment"<>"";

How do you comment an MS-access Query?

Thanks!

Andre
  • 26,751
  • 7
  • 36
  • 80
nm111
  • 3
  • 2

1 Answers1

0

The answer assumes that there is something else in the WHERE clause.

If there isn't, you would simply do:

SELECT prod_name 
FROM products
WHERE "Comment: FYI, This is a comment"<>"";
Andre
  • 26,751
  • 7
  • 36
  • 80
  • Thanks this works! Makes sense now, the AND bit is to add the comment if there is another thing going on. – nm111 Jun 27 '21 at 02:35