TYPE=VIEW
query=select `v`.`shcode` AS `shcode`,`od_s`.`cc_loan_code` AS `cc_loan_code`,`v`.`sub_head` AS `sub_head`,sum(`v`.`dr`) AS `dr`,sum(`v`.`cr`) AS `cr`,`v`.`htcode` AS `htcode`,`v`.`type` AS `type` from `co-operativebank`.`headvoucher` `v` join `co-operativebank`.`od_s` where ((`od_s`.`cc_loan_code` = `v`.`shcode`) and (`v`.`date` <= \'2019-02-09\') and (`v`.`htcode` = \'23000\') and ((`v`.`cr` <> 0) or (`v`.`dr` <> 0))) group by `v`.`shcode` union all select `v`.`shcode` AS `shcode`,`od_s`.`cc_loan_code` AS `cc_loan_code`,`v`.`sub_head` AS `sub_head`,sum(`v`.`dr`) AS `dr`,sum(`v`.`cr`) AS `cr`,`v`.`htcode` AS `htcode`,`v`.`type` AS `type` from `co-operativebank`.`headvoucher` `v` join `co-operativebank`.`od_s` where ((`od_s`.`sub_head` = `v`.`shcode`) and (`v`.`date` <= \'2019-02-09\') and (`v`.`htcode` = \'23000\') and ((`v`.`cr` <> 0) or (`v`.`dr` <> 0))) group by `v`.`shcode`
md5=427f66db7ca312ef0c6ca83de626ca13
updatable=0
algorithm=0
definer_user=admin
definer_host=localhost
suid=2
with_check_option=0
timestamp=2019-02-09 03:39:57
create-version=1
source=select shcode,cc_loan_code,v.sub_head, sum(dr) dr,sum(cr) cr, htcode, type from headvoucher v,od_s where cc_loan_code=v.shcode and date<=\'2019-02-09\' and htcode=\'23000\' and (cr<>0 or dr<>0)  GROUP by shcode UNION ALL select shcode,cc_loan_code,v.sub_head, sum(dr) dr,sum(cr) cr, htcode, type from headvoucher v,od_s where od_s.sub_head=v.shcode and date<=\'2019-02-09\' and htcode=\'23000\' and (cr<>0 or dr<>0)  GROUP by shcode
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `v`.`shcode` AS `shcode`,`od_s`.`cc_loan_code` AS `cc_loan_code`,`v`.`sub_head` AS `sub_head`,sum(`v`.`dr`) AS `dr`,sum(`v`.`cr`) AS `cr`,`v`.`htcode` AS `htcode`,`v`.`type` AS `type` from `co-operativebank`.`headvoucher` `v` join `co-operativebank`.`od_s` where ((`od_s`.`cc_loan_code` = `v`.`shcode`) and (`v`.`date` <= \'2019-02-09\') and (`v`.`htcode` = \'23000\') and ((`v`.`cr` <> 0) or (`v`.`dr` <> 0))) group by `v`.`shcode` union all select `v`.`shcode` AS `shcode`,`od_s`.`cc_loan_code` AS `cc_loan_code`,`v`.`sub_head` AS `sub_head`,sum(`v`.`dr`) AS `dr`,sum(`v`.`cr`) AS `cr`,`v`.`htcode` AS `htcode`,`v`.`type` AS `type` from `co-operativebank`.`headvoucher` `v` join `co-operativebank`.`od_s` where ((`od_s`.`sub_head` = `v`.`shcode`) and (`v`.`date` <= \'2019-02-09\') and (`v`.`htcode` = \'23000\') and ((`v`.`cr` <> 0) or (`v`.`dr` <> 0))) group by `v`.`shcode`
