commenting in SQL View, and running specific queries

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

How can I comment lines in an SQL query in SQL view?
eg.

//select * from tableY
select * from tableX

Also, is it possible to just run one query (if I have several different
queries) in SQL View if I highlight it or something? For example, in the
example above, can I highlight "select * from tableY" and just execute that
one line?

Thank you.
 
How can I comment lines in an SQL query in SQL view?
eg.

//select * from tableY
select * from tableX

You can't. Alas, Access JET SQL doesn't support commenting.
Also, is it possible to just run one query (if I have several different
queries) in SQL View if I highlight it or something? For example, in the
example above, can I highlight "select * from tableY" and just execute that
one line?

You also cannot include multiple SQL statements in a single Query.
Each stored Query must contain just one SELECT or UPDATE or DELETE
query. If you want to run multiple queries, you must run them from a
macro or from VBA code.

Nonstandard, I know - hard to get used to, I agree - but that's how
Microsoft chose to implement JET.
 
Back
Top