oracle - how to run such sql query. I am facing an error here ORA-01427 -
i have written sql query
select a.unit_code unit, a.gh_vill pl_vill, a.gh_grow pl_grow, (select gh_area w_cane_survey_2013 b b.croptype_code > 12 , a.gh_no = b.gh_no ) paudha, (select gh_area w_cane_survey_2013 b b.croptype_code < 13 , a.gh_no = b.gh_no) pedi w_cane_survey_2013 a.unit_code = '03' , a.gh_vill = '9991' , gh_grow = '1'; when execute getting error
ora-01427: single-row subquery returns more 1 row
01427. 00000 - "single-row subquery returns more 1 row"
*cause:
*action:
try query hope helpful:
select unit_code unit, gh_vill pl_vill, gh_grow pl_grow, case when croptype_code > 12 gh_area end paudha, case when croptype_code < 13 gh_area end pedi w_cane_survey_2013 unit_code = '03' , gh_vill = '9991' , gh_grow = '1' group unit_code, gh_vill , gh_grow, croptype_code, gh_area;
Comments
Post a Comment