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 1234»»»

Operators Expand / Collapse
Author
Message
Posted Saturday, March 26, 2011 2:19 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, August 29, 2014 6:19 AM
Points: 3,917, Visits: 5,109
Comments posted to this topic are about the item Operators

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #1084485
Posted Saturday, March 26, 2011 2:22 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 6:50 PM
Points: 5,595, Visits: 24,997
Nice question

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #1084486
Posted Saturday, March 26, 2011 10:13 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, June 16, 2014 9:38 AM
Points: 2,163, Visits: 2,189
Thanks for the question!
Post #1084529
Posted Sunday, March 27, 2011 3:00 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 5:52 PM
Points: 2,270, Visits: 3,789
It is a very good question. Got it wrong though :)

Mohammed Moinudheen
Post #1084545
Posted Sunday, March 27, 2011 6:25 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 7:14 AM
Points: 8,739, Visits: 9,286
Interesting question.

I managed to get it wrong by forgetting that += was introduced in 2008, not 2005.

One comment though: depending on settings of ARITHABORT and ANSI WARNINGS, it is quite possible that none of the answer options will result, because the batch is terminated before it reaches the select statement. I expect some people will say "just assume the defaults", but the defaults are quite different for batches run from an SSMS Query Window and for batches run from user applications (ANSI WARNINGS is ON by default in the former case, and OFF by default in the latter case) so perhaps questions like this ought to specify the settings.


Tom
Post #1084564
Posted Sunday, March 27, 2011 10:47 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 15, 2011 2:49 AM
Points: 2, Visits: 6
Smart question. I successfully got it wrong. I never knew that += has been introduced in 08 and the query format seemed quite confusing. There is however much more to dig deep for SQL developers. The answer given is relative.
Post #1084688
Posted Monday, March 28, 2011 12:26 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 11:26 AM
Points: 13,622, Visits: 10,514
Nice and easy, thanks.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1084720
Posted Monday, March 28, 2011 1:30 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Sunday, August 17, 2014 2:48 PM
Points: 3,352, Visits: 1,481
Nice question, thanks. Took me a while to work out what was being asked!
Post #1084740
Posted Monday, March 28, 2011 1:54 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 3:55 AM
Points: 558, Visits: 1,475
Good question, thanks.
Post #1084748
Posted Monday, March 28, 2011 2:55 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, August 15, 2012 9:26 AM
Points: 23, Visits: 14
OK, can somebody suggest why this returns "Msg 102, Level 15, State 1, Line 4 Incorrect syntax near '='." on my 9.0.4207 SQL server?

declare @i tinyint
SELECT @i = 0
while @i < 255
SELECT @i+=1
SELECT @i

Msg 102, Level 15, State 1, Line 4
Incorrect syntax near '='.
Post #1084773
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse