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

Question of the Day for 16 Dec 2005 Expand / Collapse
Author
Message
Posted Tuesday, December 13, 2005 12:05 PM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
Comments posted to this topic are about the Question of the Day for 16 Dec 2005 posted at http://www.sqlservercentral.com/testcenter/qod.asp?QuestionID=669.
Post #243903
Posted Tuesday, December 20, 2005 10:26 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, October 08, 2013 2:03 AM
Points: 33, Visits: 108
Can someone explain it.
Post #245612
Posted Tuesday, December 20, 2005 10:38 AM


Keeper of the Duck

Keeper of the Duck

Group: Moderators
Last Login: Thursday, April 03, 2014 10:06 PM
Points: 6,621, Visits: 1,851
Create yourself two columns. The first for @x, the second for @y. Follow through the program logic as if you were SQL Server. Keep track of what gets printed to the screen and what the values of @x and @y are. You'll see why the answer is what it is.

K. Brian Kelley, CISA, MCSE, Security+, MVP - SQL Server
Regular Columnist (Security), SQLServerCentral.com
Author of Introduction to SQL Server: Basic Skills for Any SQL Server User
| Professional Development blog | Technical Blog | LinkedIn | Twitter
Post #245619
Posted Saturday, March 13, 2010 5:55 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 3:59 AM
Points: 1,938, Visits: 1,149
when x is 0 then y =10
when x is 1 then y =9.33
when x is 2 then y =8.66
when x is 3 then y =7.99
when x is 4 then y =7.32
when x is 5 then y=6.65
when x is 6 then y=5.98

so it will print up to 0,1,2,3,4,5.Because for x=5 the condition is satisfied.


Malleswarareddy
I.T.Analyst
MCITP(70-451)
Post #882347
Posted Tuesday, November 20, 2012 3:16 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, April 14, 2014 11:50 PM
Points: 1,867, Visits: 2,275
good one...


_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1386781
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse