BUG: DTS Query Builder Problem with Inline Comment

ID: Q199280


The information in this article applies to:

BUG #: 45854 (SQLBUG_70)

SYMPTOMS

The SQL Enterprise Manager Data Transformation Services (DTS) Query Builder does not correctly build an SQL statement that begins with the SQL Server inline comment '--'. Every line after the comment is treated as part of the comment. The Query Builder does not recognize that the comment ends on the same line that contained the '--' inline comment marker. For example, if you typed the query


select * from titles
where title_id > 'B'
-- here's my comment
AND price > 11.00 


And then you clicked Build Query, you would only see the following:


select * from titles
where title_id > 'B' 


The inline comment and any subsequent lines are all treated as part of the comment.


WORKAROUND

To work around this problem, use the /* comment */ style of comments with the DTS Query Builder instead of the '--' inline comments.

For example, instead of comments like this:


-- This is a comment 


Make your comments look like:


/* This is a comment */  


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 7.0.

Additional query words: remark remarks in line


Keywords          : SSrvTran_SQL kbbug7.00 
Version           : winnt:7.0
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: January 22, 1999