Merging code from trunk that fixes #774, this work was done by incastrix
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / actions / OpenQueryAction.java
index 8a78c6e..071b130 100644 (file)
@@ -35,7 +35,8 @@ public class OpenQueryAction extends SelectionListenerAction {
     private String getQuery() {
         if (isEnabled()) {
             QueryNode node = (QueryNode) getSelectedNonResources().get(0);
-            return node.getQuery();
+            String query = node.getQuery();
+            return query == null || query.trim().endsWith(";") ? query : (query + ";");
         } else {
             return null;
         }