
/************ 31-08-2017 ****************/

INSERT INTO `batches` ( `batchName`, `batchDesc`, `deptID`) VALUES ( 'TCISSUED', 'TCISSUED', '0');


DROP PROCEDURE move_failedstudents;

DELIMITER ||

CREATE PROCEDURE `move_failedstudents`(IN p_studentID INT,IN p_failedInSemester INT,IN p_hisSemestersInThisbatch varchar(100), IN p_isFailNow INT)
BEGIN
    DECLARE p_batchID INT;
    
    DECLARE done INT DEFAULT 0;
	
	declare p_row  CURSOR for select  batchID from studentaccount where studentID=p_studentID;
        OPEN p_row;
            FETCH p_row INTO p_batchID;
            insert into failed_students (studentID,previousBatch,failedInSemester,hisSemestersInThisbatch,isFailNow) values (p_studentID,p_batchID,p_failedInSemester,p_hisSemestersInThisbatch,p_isFailNow);
        CLOSE  p_row;
	END;
||
DELIMITER ;

/****** 05-09-2017 *****************/


CREATE TABLE `exam_supplementary_bank_sib` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `challanNo` varchar(50) DEFAULT NULL,
  `studentID` int(11) DEFAULT NULL,
  `transactionID` varchar(50) DEFAULT NULL,
  `amount` float(6,2) DEFAULT NULL,
  `remarks` varchar(50) DEFAULT NULL,
  `panNum` varchar(50) DEFAULT NULL,
  `transactionDate` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;