Created
January 28, 2014 13:51
-
-
Save brettwooldridge/8668029 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String sql = "SELECT ZDeviceLite.device_id," + | |
" ZDeviceLite.ip_address," + | |
" ZDeviceLite.ip_high," + | |
" ZDeviceLite.ip_low," + | |
" ZDeviceLite.hostname," + | |
" ZDeviceLite.network," + | |
" ZDeviceLite.adapter_id," + | |
" ZDeviceLite.device_type," + | |
" ZDeviceLite.vendor_hw," + | |
" ZDeviceLite.model," + | |
" ZDeviceLite.vendor_sw," + | |
" ZDeviceLite.canonical_os_version," + | |
" ZDeviceLite.os_version," + | |
" ZDeviceLite.asset_identity," + | |
" ZDeviceLite.backup_status," + | |
" ZDeviceLite.compliance_state," + | |
" ZDeviceLite.last_backup," + | |
" ZDeviceLite.last_telemetry," + | |
" ZDeviceLite.memo_summary," + | |
" ZDeviceLite.custom1," + | |
" ZDeviceLite.custom2," + | |
" ZDeviceLite.custom3," + | |
" ZDeviceLite.custom4," + | |
" ZDeviceLite.custom5" + | |
" FROM device ZDeviceLite" + | |
" JOIN" + | |
" (SELECT t0.device_id" + | |
" FROM device t0" + | |
" JOIN" + | |
" (SELECT t1.device_id" + | |
" FROM device t1 JOIN" + | |
" (SELECT device_id" + | |
" FROM device d" + | |
" WHERE d.ip_low BETWEEN 167772672 AND 167772927" + | |
" AND network='Default'" + | |
" UNION SELECT d2.device_id" + | |
" FROM device d2," + | |
" (SELECT i.device_id" + | |
" FROM device_interface_ips i" + | |
" WHERE i.ip_low BETWEEN 167772672 AND 167772927) baz" + | |
" WHERE d2.device_id=baz.device_id" + | |
" AND d2.network='Default') AS gfd ON t1.device_id=gfd.device_id) AS j1 ON t0.device_id=j1.device_id" + | |
" AND t0.vendor_hw=?) AS j0 ON ZDeviceLite.device_id=j0.device_id" + | |
" AND ZDeviceLite.network=?" + | |
" ORDER BY ZDeviceLite.ip_high ASC," + | |
" ZDeviceLite.ip_low ASC" + | |
" OFFSET 0 ROWS FETCH NEXT 254 ROWS ONLY"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment