TYPE=VIEW
query=select `db_account_9793090153`.`tbl_batch_list`.`ba_list_id` AS `batch_id`,`view_batch_types`.`ba_type_name` AS `batch_name`,(case `db_account_9793090153`.`tbl_batch_list`.`ba_list_type` when 4 then `db_account_9793090153`.`tbl_invoice_list`.`in_list_number` when 12 then `db_account_9793090153`.`tbl_note_list`.`note_list_id` when 23 then `db_account_9793090153`.`tbl_installment_list`.`nt_list_number` else `db_account_9793090153`.`tbl_batch_list`.`ba_list_number` end) AS `batch_desc` from ((((`db_account_9793090153`.`tbl_batch_list` join `db_account_9793090153`.`view_batch_types` on(((`view_batch_types`.`ba_list_type` = `db_account_9793090153`.`tbl_batch_list`.`ba_list_type`) and (`view_batch_types`.`ba_type_id` = `db_account_9793090153`.`tbl_batch_list`.`ba_list_type_id`)))) left join `db_account_9793090153`.`tbl_invoice_list` on(((`db_account_9793090153`.`tbl_invoice_list`.`in_list_id` = `db_account_9793090153`.`tbl_batch_list`.`ba_list_source_id`) and (`db_account_9793090153`.`tbl_batch_list`.`ba_list_type` = 4)))) left join `db_account_9793090153`.`tbl_note_list` on(((`db_account_9793090153`.`tbl_note_list`.`note_list_id` = `db_account_9793090153`.`tbl_batch_list`.`ba_list_source_id`) and (`db_account_9793090153`.`tbl_batch_list`.`ba_list_type` = 12)))) left join `db_account_9793090153`.`tbl_installment_list` on(((`db_account_9793090153`.`tbl_installment_list`.`nt_list_id` = `db_account_9793090153`.`tbl_batch_list`.`ba_list_source_id`) and (`db_account_9793090153`.`tbl_batch_list`.`ba_list_type` = 23)))) group by `db_account_9793090153`.`tbl_batch_list`.`ba_list_id`
md5=5df362627e67583af7dafc406b43f5ac
updatable=0
algorithm=0
definer_user=root
definer_host=%
suid=1
with_check_option=0
timestamp=2014-01-01 21:20:13
create-version=1
source=select
\n  `tbl_batch_list`.`ba_list_id` AS `batch_id`,
\n  `view_batch_types`.`ba_type_name` AS `batch_name`,
\n  (case `tbl_batch_list`.`ba_list_type`
\n  when 4 then `tbl_invoice_list`.`in_list_number`
\n  when 12 then `tbl_note_list`.`note_list_id`
\n  when 23 then `tbl_installment_list`.`nt_list_number`
\n  else `tbl_batch_list`.`ba_list_number`
\nend) AS `batch_desc`
\nfrom
\n  ((((`tbl_batch_list`
\n  join `view_batch_types` on (((`view_batch_types`.`ba_list_type` = `tbl_batch_list`.`ba_list_type`)
\n   and (`view_batch_types`.`ba_type_id` = `tbl_batch_list`.`ba_list_type_id`))))
\n  left join `tbl_invoice_list` on (((`tbl_invoice_list`.`in_list_id` =
\n   `tbl_batch_list`.`ba_list_source_id`) and (`tbl_batch_list`.`ba_list_type` = 4))))
\n  left join `tbl_note_list` on (((`tbl_note_list`.`note_list_id` =
\n   `tbl_batch_list`.`ba_list_source_id`) and (`tbl_batch_list`.`ba_list_type` = 12))))
\n  left join `tbl_installment_list` on (((`tbl_installment_list`.`nt_list_id` =
\n   `tbl_batch_list`.`ba_list_source_id`) and (`tbl_batch_list`.`ba_list_type` = 23))))
\ngroup by
\n  `tbl_batch_list`.`ba_list_id`
client_cs_name=cp1256
connection_cl_name=cp1256_general_ci
view_body_utf8=select `db_account_9793090153`.`tbl_batch_list`.`ba_list_id` AS `batch_id`,`view_batch_types`.`ba_type_name` AS `batch_name`,(case `db_account_9793090153`.`tbl_batch_list`.`ba_list_type` when 4 then `db_account_9793090153`.`tbl_invoice_list`.`in_list_number` when 12 then `db_account_9793090153`.`tbl_note_list`.`note_list_id` when 23 then `db_account_9793090153`.`tbl_installment_list`.`nt_list_number` else `db_account_9793090153`.`tbl_batch_list`.`ba_list_number` end) AS `batch_desc` from ((((`db_account_9793090153`.`tbl_batch_list` join `db_account_9793090153`.`view_batch_types` on(((`view_batch_types`.`ba_list_type` = `db_account_9793090153`.`tbl_batch_list`.`ba_list_type`) and (`view_batch_types`.`ba_type_id` = `db_account_9793090153`.`tbl_batch_list`.`ba_list_type_id`)))) left join `db_account_9793090153`.`tbl_invoice_list` on(((`db_account_9793090153`.`tbl_invoice_list`.`in_list_id` = `db_account_9793090153`.`tbl_batch_list`.`ba_list_source_id`) and (`db_account_9793090153`.`tbl_batch_list`.`ba_list_type` = 4)))) left join `db_account_9793090153`.`tbl_note_list` on(((`db_account_9793090153`.`tbl_note_list`.`note_list_id` = `db_account_9793090153`.`tbl_batch_list`.`ba_list_source_id`) and (`db_account_9793090153`.`tbl_batch_list`.`ba_list_type` = 12)))) left join `db_account_9793090153`.`tbl_installment_list` on(((`db_account_9793090153`.`tbl_installment_list`.`nt_list_id` = `db_account_9793090153`.`tbl_batch_list`.`ba_list_source_id`) and (`db_account_9793090153`.`tbl_batch_list`.`ba_list_type` = 23)))) group by `db_account_9793090153`.`tbl_batch_list`.`ba_list_id`
