Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««34567

Subtle Line Feed / Carriage Return issue Expand / Collapse
Author
Message
Posted Thursday, January 6, 2011 5:39 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 12:25 AM
Points: 242, Visits: 159
I have tested this.
In context of SQL Server 2000 it is correct answer as by you.
But In SQL Server 2008 answer will be 1,2,3,4.

Post #1043682
Posted Wednesday, January 26, 2011 11:32 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, April 19, 2011 1:59 AM
Points: 1,042, Visits: 234
I executed the scriptin SQL Server 2005, Got following output -


What you see...
-----------------------
print 1
-- Comment one
print 2
-- Comment two
print 3
-- Comment three
print 4

is not what you get!
-----------------------
1
2
3
4


I want to understand why the output will be 1, 3, 4?? Can anyone explain how it is correct?
Post #1054390
Posted Thursday, January 27, 2011 4:57 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 9:07 AM
Points: 1,632, Visits: 5,587
tejaswini.patil (1/26/2011)
I want to understand why the output will be 1, 3, 4?? Can anyone explain how it is correct?


Have you tried reading the rest of the comments? It's already been pointed out multiple times that the answer as given only applies to SQL 2000--later versions produce 1,2,3,4.
Post #1054480
Posted Friday, April 29, 2011 12:55 PM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Sunday, March 4, 2012 4:02 AM
Points: 660, Visits: 134
I suppose it would be SQL 2000 vs SQL 2005 and the bug has been fixed, but I want that point.
Post #1101012
Posted Tuesday, May 17, 2011 5:24 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, June 21, 2012 1:29 AM
Points: 62, Visits: 67
me too...
Post #1110084
Posted Tuesday, May 17, 2011 5:41 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 6:40 PM
Points: 8,743, Visits: 9,292
terrykzncs (4/29/2011)
I suppose it would be SQL 2000 vs SQL 2005 and the bug has been fixed, but I want that point.

Not quite. It is indeed SQL 2000 vs SQL 2005. But rather than a bug having been fixed, a really stupid bug has been added - intentionally. See http://www.sqlservercentral.com/Forums/FindPost1038756.aspx for a simple explanation.


Tom
Post #1110097
« Prev Topic | Next Topic »

Add to briefcase «««34567

Permissions Expand / Collapse