con632s_gps_address.lwm 1022 Bytes
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    tt.address
                FROM
                    (SELECT
                        *
                    FROM
                        AST_CAR_GPS_ADDRESS t1
                    WHERE
                        EXISTS
                        (SELECT
                            1
                        FROM
                            ast_car_gps acg
                        WHERE
                            acg.ast_car_gps_id = t1.ast_car_gps_id AND
                            acg.contract_id    = ${@contract_id}
                        )
                    ORDER BY
                        t1.last_update_date DESC
                    ) tt
                WHERE
                    rownum = 1
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>