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 «««23456

Predict output Expand / Collapse
Author
Message
Posted Tuesday, February 2, 2010 1:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, February 2, 2010 1:13 AM
Points: 4, Visits: 2
I really disagrree with the answer 1245.
the actual resul it is 12345.
if @i = 3 then we are setting J = @i/0;

so there no use of this statement finally we are storing the i value in to the temparory table.
Post #857763
Posted Wednesday, February 3, 2010 6:44 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, June 3, 2014 7:31 AM
Points: 155, Visits: 386
srinivas.thadem (2/2/2010)
I really disagrree with the answer 1245.
the actual resul it is 12345.
if @i = 3 then we are setting J = @i/0;

so there no use of this statement finally we are storing the i value in to the temparory table.


You can't divide by 0.... unless your name is Chuck Norris.
Post #858600
Posted Monday, March 15, 2010 10:36 PM


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: Friday, June 13, 2014 3:03 PM
Points: 594, Visits: 655
I like to think of the right answer as being the one "closest" to being right, which was the right answer which I chose despite knowing that the output did not look exactly correct but could not possibly be the other choices in any order.

Another good exercise for the kiddies in class! Keep those QOTD's coming!


Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
Post #883544
Posted Tuesday, March 30, 2010 10:32 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 10:07 PM
Points: 9,926, Visits: 11,183
Liked the use of TRY...CATCH (though checking XACT_STATE would be cool).
Disliked the loop.
On balance: not bad.




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #893032
Posted Thursday, November 24, 2011 2:07 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 10:57 PM
Points: 4,240, Visits: 4,290
A poorly worded trick question.


For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Post #1211740
« Prev Topic | Next Topic »

Add to briefcase «««23456

Permissions Expand / Collapse