NOT GETTING ANSWER

NOT GETTING ANSWER

Post by SOMU » Tue, 30 Dec 2008 03:41:06


ALTER PROC STUDENTS
( @M1 INT,
@M2 INT,
@M3 INT,
@M4 INT,
@M5 INT
)

AS

DECLARE @PER INT
SELECT @PER =(@M1+@M2+@M3+@M4+@M5)/5

IF(( @PER > 50 ) AND ( @PER <= 60 ))
PRINT ' FIRST CLASS '

IF(( @PER > 40 ) AND ( @PER <= 50 ))
PRINT ' SECOND CLASS '

IF( @PER >= 40 )
PRINT 'PASS'



EXEC STUDENTS 4,5,5,5,8



From http://www.yqcomputer.com/

Posted via DevelopmentNow.com Groups
http://www.yqcomputer.com/
 
 
 

NOT GETTING ANSWER

Post by Aaron Bert » Tue, 30 Dec 2008 04:31:37

What answer could you possibly expect? 8 + 5 + 5 + 5 + 4 = 27 and 27 / 5 =
5 (integer math), but you have only handled cases where the result is >= 40.


On 12/28/08 1:41 PM, in article
XXXX@XXXXX.COM , "SOMU"

 
 
 

NOT GETTING ANSWER

Post by --CELKO- » Tue, 30 Dec 2008 08:54:29

NULLs?
 
 
 

NOT GETTING ANSWER

Post by TUw » Wed, 31 Dec 2008 21:16:01

?