azurelunatic: Vivid pink Alaskan wild rose. (Default)
Azure Jane Lunatic (Azz) 🌺 ([personal profile] azurelunatic) wrote2002-08-23 11:07 am

Oy vey.

Does anyone know how, before I wander home, to comment code in MS Access variety SQL?

[identity profile] silmarian.livejournal.com 2002-08-23 11:17 am (UTC)(link)
I"m not sure you can. Access is designed to be used by people too dumb to touch the code. :b

[identity profile] spacemummy.livejournal.com 2002-08-23 11:21 am (UTC)(link)
Mwahaha!

[identity profile] boojum.livejournal.com 2002-08-23 12:42 pm (UTC)(link)
I'm glad you said that. I will not categorically claim that all lack-of-commenting is evil, because I have heard things from trustworthy people about Extreme Programming which suggest it might be possible, given whole rafts of other stuff, for comments to be extraneous and even somewhat unhelpful. In the general case though, commenting is good, and people who don't want to comment should be shot.

I liked the CS assignment of "Here's this code. Fix the bugs and make it also do x, y, and z. Oh, and since we're being nice to you, we advise you to make it legible first." Legible code much much much much nicer for maintenance purposes.

I think the garden-variety SQL comment is something weird. Have you tried a comma, a colon, or a semicolon as a beginning-of-line comment? Failing that, MS seems to have decent online documentation. Google can be told to restrict its search to a certain site, so searching their Access site for "comment delimiter" or something might work.

A very lackadaisical googling also suggests the hash mark as a beginning-of-line comment marker in Microsoft SQL only. I'm beginning to be fried from the cold, so I can't do a trustworthy-check on the source.