ASHUTOSH SHARMA

ASHUTOSH SHARMA

  • NA
  • 1
  • 1.4k

subquery working in oracle but not in grid view

Sep 2 2012 4:25 AM
SELECT STUDENT.ROLLNO, STUDENT.NAME, STUDENT.COURSE, STUDENT.CATEGORY,(SELECT SUM(casual) FROM leave WHERE rollno=student.rollno AND leavestatus='APPROVED' AND leave.startdate>=:d1 AND leave.enddate<=:d2) AS SANCSENEDCASUAL,(SELECT SUM(medical) FROM leave WHERE rollno=student.rollno AND leavestatus='APPROVED' AND leave.startdate>=:d3 AND leave.enddate<=:d4) AS SANCENEDMEDICAL, LEAVE.STARTDATE, LEAVE.ENDDATE FROM STUDENT, LEAVE WHERE STUDENT.ROLLNO = LEAVE.ROLLNO AND (LEAVE.STARTDATE >= :d5) AND (LEAVE.ENDDATE <= :d6) AND (LEAVE.LEAVESTATUS = 'APPROVED') AND (STUDENT.DEPT = :dept)

I am using this query it is working perfactly  in oracle but not giving any data in gridview
all the parameters are bounded correctly with there datatypes. 

Answers (1)