Index: /tags/ipp-pv3-20140717/ippTools/src/remotetool.c
===================================================================
--- /tags/ipp-pv3-20140717/ippTools/src/remotetool.c	(revision 38108)
+++ /tags/ipp-pv3-20140717/ippTools/src/remotetool.c	(revision 38109)
@@ -155,4 +155,15 @@
   else if (!strcmp(stage,"staticsky")) {
     query = pxDataGet("remotetool_definebyquery_staticsky.sql");
+    if (!query) {
+      psError(PXTOOLS_ERR_SYS,false, "failed to retreive SQL statement");
+      return(false);
+    }
+
+    if (label) {
+      psStringAppend(&whereOption, "\n AND (label = '%s')", label);
+    }
+  }
+  else if (!strcmp(stage,"diff")) {
+    query = pxDataGet("remotetool_definebyquery_diff.sql");
     if (!query) {
       psError(PXTOOLS_ERR_SYS,false, "failed to retreive SQL statement");
