Hi All, I am doing a fetch operation and this results in generation of a query which is as follows. Please see the line in blue where the field *t0.BW_WASD_LOCATION IS NULL.* I am not able to find out why this field is coming up as null. This results in fetch failing for any of the input values.
SELECT t0.BW_WASD_ID, t1.HA_EMPM_EMPLOYEE_ID, t1.HA_EMPM_CRT_DT, t1.HA_EMPM_CRT_UID, t1.HA_EMPM_DEPARTMENT, t1.HA_EMPM_DESIGNATION, t1.HA_EMPM_EFFECT_DT, t1.HA_EMPM_EMP_CODE, t1.HA_EMPM_EMP_NAME, t1.HA_EMPM_INSTITUTION, t1.HA_EMPM_LAST_UPD_DT, t1.HA_EMPM_LAST_UPD_UID, t1.HA_EMPM_SPECIALITY, t2.BW_BINM_CODE, t3.BW_BAGM_BAG_ID, t3.BW_BAGM_CODE, t3.BW_BAGM_SIZE, t3.BW_BAGM_COLOR, t3.BW_BAGM_CRT_DT, t3.BW_BAGM_CRT_UID, t3.BW_BAGM_EFFECT_DT, t3.BW_BAGM_INSTITUTION, t3.BW_BAGM_LAST_UPD_DT, t3.BW_BAGM_LAST_UPD_UID, t3.BW_BAGM_STATUS, t2.BW_BINM_SIZE, t4.BW_COLM_CODE, t4.BW_COLM_DESC, t4.BW_COLM_CRT_DT, t4.BW_COLM_CRT_UID, t4.BW_COLM_EFFECT_DT, t4.BW_COLM_LAST_UPD_DT, t4.BW_COLM_LAST_UPD_UID, t4.BW_COLM_STATUS, t2.BW_BINM_CRT_DT, t2.BW_BINM_CRT_UID, t2.BW_BINM_DESTROY_PROCESS, t2.BW_BINM_EFFECT_DT, t2.BW_BINM_LAST_UPD_DT, t2.BW_BINM_LAST_UPD_UID, t2.BW_BINM_STATUS, t0.BW_WASD_CRT_DT, t0.BW_WASD_CRT_UID, t5.AIS_DEPM_CODE, t5.AIS_DEPM_CRT_DT, t5.AIS_DEPM_CRT_UID, t5.AIS_DEPM_NAME, t5.AIS_DEPM_EFFECT_DT, t5.AIS_DEPM_LAST_UPD_DT, t5.AIS_DEPM_LAST_UPD_UID, t5.AIS_DEPM_STATUS, t0.BW_WASD_DET_ENTR_BY, t6.BW_AGEM_CODE, t6.BW_AGEM_NAME, t6.BW_AGEM_CRT_DT, t6.BW_AGEM_CRT_UID, t6.BW_AGEM_EFFECT_DT, t6.BW_AGEM_LAST_UPD_DT, t6.BW_AGEM_LAST_UPD_UID, t6.BW_AGEM_STATUS, t0.BW_WASD_DISP_DATE, t7.HA_EMPM_EMPLOYEE_ID, t7.HA_EMPM_CRT_DT, t7.HA_EMPM_CRT_UID, t7.HA_EMPM_DEPARTMENT, t7.HA_EMPM_DESIGNATION, t7.HA_EMPM_EFFECT_DT, t7.HA_EMPM_EMP_CODE, t7.HA_EMPM_EMP_NAME, t7.HA_EMPM_INSTITUTION, t7.HA_EMPM_LAST_UPD_DT, t7.HA_EMPM_LAST_UPD_UID, t7.HA_EMPM_SPECIALITY, t0.BW_WASD_ENTR_DATE, t8.st_spom_id, t8.st_spom_crt_dt, t8.st_spom_crt_uid, t9.AIS_INSM_CODE, t9.AIS_INSM_TYPE, t9.AIS_INSM_BEMONC, t9.AIS_INSM_BEMONC_START_DATE, t9.AIS_INSM_BLOCK, t9.AIS_INSM_BLOCK_PHC_ATTACHED, t9.AIS_INSM_CEMONC, t9.AIS_INSM_CEMONC_START_DATE, t9.AIS_INSM_CRT_DT, t9.AIS_INSM_CRT_UID, t9.AIS_INSM_DISTRICT, t9.AIS_INSM_EFFECT_DT, t9.AIS_INSM_HSC_DELIVERY_ROOM, t9.AIS_INSM_HSC_LAB, t9.AIS_INSM_HSC_TRIBAL_STATUS, t9.AIS_INSM_HUD, t9.AIS_INSM_NAME, t9.AIS_INSM_LAST_UPD_DT, t9.AIS_INSM_LAST_UPD_UID, t9.AIS_INSM_LOCAL_BODY, t9.AIS_INSM_LOCATION, t9.AIS_INSM_ORGANISAION, t9.AIS_INSM_PHC_ATTACHED, t9.AIS_INSM_PHC_DELIVERY_ROOM, t9.AIS_INSM_PHC_LAB_STATUS, t9.AIS_INSM_PHC_TRIBAL_STATUS, t9.AIS_INSM_STATUS, t9.AIS_INSM_SUB_TYPE, t9.AIS_INSM_TALUK, t8.st_spom_last_upd_udt, t8.st_spom_last_upd_uid, t8.st_spom_status, t8.st_spom_code, t8.st_spom_desc, t8.st_spom_stocking_point_grade, t8.st_spom_type, t8.st_spom_ward_id, t10.AIS_INSM_CODE, t10.AIS_INSM_TYPE, t10.AIS_INSM_BEMONC, t10.AIS_INSM_BEMONC_START_DATE, t10.AIS_INSM_BLOCK, t10.AIS_INSM_BLOCK_PHC_ATTACHED, t10.AIS_INSM_CEMONC, t10.AIS_INSM_CEMONC_START_DATE, t10.AIS_INSM_CRT_DT, t10.AIS_INSM_CRT_UID, t10.AIS_INSM_DISTRICT, t10.AIS_INSM_EFFECT_DT, t10.AIS_INSM_HSC_DELIVERY_ROOM, t10.AIS_INSM_HSC_LAB, t10.AIS_INSM_HSC_TRIBAL_STATUS, t10.AIS_INSM_HUD, t10.AIS_INSM_NAME, t10.AIS_INSM_LAST_UPD_DT, t10.AIS_INSM_LAST_UPD_UID, t10.AIS_INSM_LOCAL_BODY, t10.AIS_INSM_LOCATION, t10.AIS_INSM_ORGANISAION, t10.AIS_INSM_PHC_ATTACHED, t10.AIS_INSM_PHC_DELIVERY_ROOM, t10.AIS_INSM_PHC_LAB_STATUS, t10.AIS_INSM_PHC_TRIBAL_STATUS, t10.AIS_INSM_STATUS, t10.AIS_INSM_SUB_TYPE, t10.AIS_INSM_TALUK, t0.BW_WASD_LAST_UPD_DT, t0.BW_WASD_LAST_UPD_UID, t0.BW_WASD_NUM_OF_BAGS, t0.BW_WASD_REMARKS, t0.BW_WASD_STATUS, t0.BW_WASD_NUM, t0.BW_WASD_WT FROM BW_WASTE_DETAILS t0 LEFT OUTER JOIN HA_EMPLOYEE_MASTER t1 ON t0.BW_WASD_AUTH_BY = t1.HA_EMPM_EMPLOYEE_ID LEFT OUTER JOIN BW_BIN_MASTER t2 ON t0.BW_WASD_BIN = t2.BW_BINM_CODE LEFT OUTER JOIN AIS_DEPARTMENT_MASTER t5 ON t0.BW_WASD_DEPARTMENT = t5.AIS_DEPM_CODE LEFT OUTER JOIN BW_AGENCY_MASTER t6 ON t0.BW_WASD_DISP_BY = t6.BW_AGEM_CODE LEFT OUTER JOIN HA_EMPLOYEE_MASTER t7 ON t0.BW_WASD_ENTR_BY = t7.HA_EMPM_EMPLOYEE_ID LEFT OUTER JOIN st_stocking_point_master t8 ON t0.BW_WASD_LOCATION = t8.st_spom_id LEFT OUTER JOIN AIS_INSTITUTION_MASTER t10 ON t0.BW_WASD_INSTITUTION = t10.AIS_INSM_CODE LEFT OUTER JOIN BW_BAG_MASTER t3 ON t2.BW_BINM_BAG = t3.BW_BAGM_BAG_ID LEFT OUTER JOIN BW_COLOR_MASTER t4 ON t2.BW_BINM_COLOR = t4.BW_COLM_CODE LEFT OUTER JOIN AIS_INSTITUTION_MASTER t9 ON t8.st_spom_institution = t9.AIS_INSM_CODE *WHERE (t0.BW_WASD_INSTITUTION = ? AND t0.BW_WASD_LOCATION IS NULL AND t0.BW_WASD_ENTR_DATE = ?) [params=(String) 00017, (Date) 2009-06-18]* Please advice Thanks Ashish