Please Correct my query to `Select` data.
 If there is an entry in `LeaveApply` Table having given date betwwn a `from date` and `to date` in the table, i should get the `pK` of table else `zero`.

please help

```
Select  A,
        B, 
ISNULL((select LeaveApply_Id from Tbl_Stud_Leave_Apply where Candidate_Id=120
and ('01/13/2014 12:00:00 AM' between Stud_LeaveFromDate and Stud_LeaveToDate)),0) As Leave from TableA where Condition.

```