query 문을 돌리면 자꾸 에러 메시지가 나오는데 뭐가 뭔지 모르겠습니다.
select name_code, substring(inout_day, 1, 6) , '','월계', sum(dr_amt), sum(cr_amt), substring(inout_day, 1, 6)+ '02' n_id
from tbl_suntot
where INOUT_DAY >='20140101'
and INOUT_DAY <='20141231'
and com_id='S'
and comp_id='S03'
and acc_id='259'
and name_code='1022'
group by name_code, substring(inout_day, 1, 6)
tbl_suntot.inout_day' 열이 집계 함수나 GROUP BY 절에 없으므로 SELECT 목록에서 사용할 수 없습니다.
Comment 1
-
Hisory
2014.09.24 11:32
음 신기하네여 제가 보기에도 별 문제 없어 보이는데 음..
select name_code, substring(inout_day, 1, 6) , '','월계', sum(dr_amt), sum(cr_amt), substring(inout_day, 1, 6)+ '02' n_id
from tbl_suntot
where INOUT_DAY >='20140101'
and INOUT_DAY <='20141231'
and com_id='S'
and comp_id='S03'
and acc_id='259'
and name_code='1022'
group by name_code
쿼리 실행하실때 group by 뒤에 substring(inout_day, 1, 6) 선택 안하시고 실행하신건 아닌지...