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 Friday, January 29, 2010 9:56 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 8:53 PM
Points: 33,204, Visits: 15,353
The answer is arguably correct since an exception occurs and is handled in the code. The order of what appears, and where, depends on your client.

The question has been edited to separate out "results" and "messages"







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #856217
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


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 4:20 PM
Points: 11,194, Visits: 11,142
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: 2 days ago @ 7:06 AM
Points: 4,196, Visits: 4,268
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