## Question of the Day for 16 Dec 2005

 Author Message Site Owners SSChampion Group: General Forum Members Points: 10085 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. Ramesh Mutyapu SSC Rookie Group: General Forum Members Points: 33 Visits: 108 Can someone explain it. K. Brian Kelley Keeper of the Duck Group: Moderators Points: 6770 Visits: 1908 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 ServerRegular Columnist (Security), SQLServerCentral.comAuthor of Introduction to SQL Server: Basic Skills for Any SQL Server User| Professional Development blog | Technical Blog | LinkedIn | Twitter malleswarareddy_m SSCrazy Group: General Forum Members Points: 2009 Visits: 1189 when x is 0 then y =10when x is 1 then y =9.33when x is 2 then y =8.66when x is 3 then y =7.99when x is 4 then y =7.32when x is 5 then y=6.65when x is 6 then y=5.98so it will print up to 0,1,2,3,4,5.Because for x=5 the condition is satisfied. MalleswarareddyI.T.AnalystMCITP(70-451) kapil_kk SSCrazy Group: General Forum Members Points: 2417 Visits: 2763 good one... _______________________________________________________________To get quick answer follow this link:http://www.sqlservercentral.com/articles/Best+Practices/61537/