PC Review


Reply
Thread Tools Rate Thread

Commenting SQL code in Union query

 
 
tom
Guest
Posts: n/a
 
      10th Nov 2006
How to comment SQL code in a Union Query or
any query for that matter.

I tried help but couldnt seem to find the answer to this
one.


 
Reply With Quote
 
 
 
 
RoyVidar
Guest
Posts: n/a
 
      10th Nov 2006
"tom" <(E-Mail Removed)> wrote in message
<5I65h.488$(E-Mail Removed)>:
> How to comment SQL code in a Union Query or
> any query for that matter.
>
> I tried help but couldnt seem to find the answer to this
> one.


As far as I know that isn't possible with Access queries, except for
right clicking the query in the database window, select properties,
and "document" in the description property.

--
Roy-Vidar


 
Reply With Quote
 
Matthias Klaey
Guest
Posts: n/a
 
      10th Nov 2006
"tom" <(E-Mail Removed)> wrote:

>How to comment SQL code in a Union Query or
>any query for that matter.
>
>I tried help but couldnt seem to find the answer to this
>one.
>


AFAIK there is no way to put comments into the SQL code for any Access
query. The only possibility I see ist to use the Description Property
of the query. For passtrough queries, the server rules should apply,
so it may be possible to include comments.

HTH
Matthias Kläy
--
www.kcc.ch
 
Reply With Quote
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      10th Nov 2006
There really isn't a good way to comment a JET query, but here is a possible
work-around:

Open a table or query's property sheet and type your comments in the
Description property. In the query QBE grid, you can also select a column
and use its Description property. Union queries do not have the QBE grid,
but I always take the constituent parts and save them as separate queries,
like:

qryUnionMain
qryUnionMain1
qryUnionMain2
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"tom" <(E-Mail Removed)> wrote in message
news:5I65h.488$(E-Mail Removed)...
> How to comment SQL code in a Union Query or
> any query for that matter.
>
> I tried help but couldnt seem to find the answer to this
> one.
>



 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      10th Nov 2006
I haven't tried Stephen Lebans "addsqlcomments" but here it is:

http://www.lebans.com/addsqlcomments.htm

--
HTH
Van T. Dinh
MVP (Access)



"tom" <(E-Mail Removed)> wrote in message
news:5I65h.488$(E-Mail Removed)...
> How to comment SQL code in a Union Query or
> any query for that matter.
>
> I tried help but couldnt seem to find the answer to this
> one.
>



 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      10th Nov 2006
On Fri, 10 Nov 2006 22:04:49 GMT, "tom" <(E-Mail Removed)>
wrote:

>How to comment SQL code in a Union Query or
>any query for that matter.
>
>I tried help but couldnt seem to find the answer to this
>one.
>


That's because comments are not supported in JET queries.

The only way is to put in a calculated field containing the comment.

John W. Vinson[MVP]
 
Reply With Quote
 
Bill Mosca, MS Access MVP
Guest
Posts: n/a
 
      10th Nov 2006

Stephen method works quite nicely, but I would rather copy the SQL into a
text file and comment it as though it were an MS SQL Server view or proc.
That way you can write inline comments. You could even store all of the text
file in a table, but keeping up with changes would be a bear.

Maybe someday, Access will accept comments in queries.

--
Bill Mosca, MS Access MVP


"Van T. Dinh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I haven't tried Stephen Lebans "addsqlcomments" but here it is:
>
> http://www.lebans.com/addsqlcomments.htm
>
> --
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
> "tom" <(E-Mail Removed)> wrote in message
> news:5I65h.488$(E-Mail Removed)...
>> How to comment SQL code in a Union Query or
>> any query for that matter.
>>
>> I tried help but couldnt seem to find the answer to this
>> one.
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code for union query Xina5280 Microsoft Access Getting Started 1 6th Jun 2008 08:01 PM
Code Union Query =?Utf-8?B?QW1hdGV1cg==?= Microsoft Access 1 1st Oct 2007 12:17 PM
Union Query Report Code???? =?Utf-8?B?Sm9zZXBo?= Microsoft Access Queries 7 30th Sep 2006 06:45 AM
Union Query Report Code ?? =?Utf-8?B?Sm9zZXBo?= Microsoft Access VBA Modules 0 29th Sep 2006 07:31 PM
SQL Union Query - Code Not Visible =?Utf-8?B?V2lsZFRoaW5n?= Microsoft Access Queries 4 23rd Nov 2005 01:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:38 PM.