2018-06-03 22:26:41 +08:00

35 lines
1.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<table-root
xmlns="http://www.tracywindy.org/table"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.tracywindy.org/table http://www.tracywindy.org/table/table-1.0.xsd">
<table>
<data>
<MYSQL>
<table_sql>
<![CDATA[
SELECT customerid,tab.customername,tab.custtypes,tab.certtype,tab.certid,tab.custkind from (
SELECT distinct info.customerid,info.customername,GROUP_CONCAT(getItemName('cust_type',ct.custtype)) custtypes,getItemName('CertType',info.certtype) certtype,info.certid,info.custkind FROM customer_info info
LEFT JOIN customer_type ct ON info.customerid=ct.customerid
WHERE ct.status='valid' and ct.custstatus='status02' GROUP BY info.customerid,info.customername,info.certtype,info.certid,info.custkind order by customername
)tab
]]>
</table_sql>
</MYSQL>
<ORACLE>
<table_sql>
<![CDATA[
SELECT customerid,tab.customername,tab.custtypes,tab.certtype,tab.certid,tab.custkind from (
SELECT distinct info.customerid,info.customername,wmsys.wm_concat(getItemName('cust_type',ct.custtype)) custtypes,getItemName('CertType',info.certtype) certtype,info.certid,info.custkind FROM customer_info info
LEFT JOIN customer_type ct ON info.customerid=ct.customerid
WHERE ct.status='valid' and ct.custstatus='status02' GROUP BY info.customerid,info.customername,info.certtype,info.certid,info.custkind order by customername
)tab
]]>
</table_sql>
</ORACLE>
<dataSource>dataSource</dataSource>
<show_sql>false</show_sql>
</data>
</table>
</table-root>