Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Commenting out in Jet SQL

Status
Not open for further replies.

Miguel

Programmer
Feb 21, 2000
11
AU
I'm programming in a product called MAZE, a school administration program. It uses Microsoft Jet SQL. I would like to be able to comment out sections of SQL while I am testing, but so far no luck. Any suggestions?<br>
Thanks.
 
Thanks Bill<br>
Single quote doesn't do it, not does:<br>
*/<br>
*<br>
{}<br>
--<br>
It is SQL that needs commenting out, not VBA. Any other suggestions?
 
Another way of doing the test would be to open a text editor and copy your SQL statement into the editor (assuming you are in SQL view). Then, overlay the original SQL with just the parts you want (copy and paste) or create a new query, go to SQL view and paste in the parts of the original you want and do your test. <br>
<br>

 
Thanks<br>
This cut/paste idea is pretty much what I've been doing thus far. Because it's a bit fiddly, with cutting non-adjacent areas, I was hoping there was a simple way of commenting areas out. Thanks anyway.
 
How about two rows of two dashes? <br>
<br>
-- This is a comment<br>
--<br>
<br>
<br>

 
Are you trying to comment within the SQL design view??<br>
Can't do that.
 
When you say SQL design view, do you mean the QBE grid? I'm not trying to do it there, but in the SQL window. <br>
eg<br>
SELECT TT.*, TTTG.*, STMA.*, SU.*<br>
FROM TT, TTTG, STMA, SU,<br>
TT INNER JOIN TTTG ON TT.TTKEY = TTTG.GKEY, <br>
STMA INNER JOIN SU ON STMA.MKEY = SU.SUKEY, <br>
TTTG INNER JOIN STMA ON TTTG.IDENT = STMA.IDENT<br>
WHERE (TT.TTKEY &gt;= [From] AND TT.TTKEY &lt;= [To]) AND HROW &lt;&gt; 0<br>
ORDER BY TTTG.SUBJ, TTTG.CLASS<br>
<br>
This isn't a particular query that I'm working on, I just grabbed one. I would like to be able to comment out one of the conditions, or in another example, comment out a grouping and an aggregate function. Currrently I cut these to the clipboard and paste them back, but since the're often non-adjacent, it's a bit cumbersome.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top