Error, Select query ($sql_comp_dtl_main) failed