diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index 4fe4d7da..5091c11d 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -399,17 +399,6 @@ def poll(trans_id):
                 additional_messages = ''.join(messages)
             notifies = conn.get_notifies()
 
-            # Procedure/Function output may comes in the form of Notices
-            # from the database server, so we need to append those outputs
-            # with the original result.
-            if result is None:
-                result = conn.status_message()
-                if (result != 'SELECT 1' or result != 'SELECT 0') and \
-                   result is not None and additional_messages:
-                    result = additional_messages + result
-                else:
-                    result = None
-
             if st:
                 if 'primary_keys' in session_obj:
                     primary_keys = session_obj['primary_keys']
@@ -496,6 +485,7 @@ def poll(trans_id):
                         col_info['pgadmin_alias'] = \
                             re.sub("[%()]+", "|", col_name)
                     session_obj['columns_info'] = columns
+
                 # status of async_fetchmany_2darray is True and result is none
                 # means nothing to fetch
                 if result and rows_affected > -1:
@@ -516,6 +506,17 @@ def poll(trans_id):
                 # restore it and update the session variable.
                 update_session_grid_transaction(trans_id, session_obj)
 
+            # Procedure/Function output may comes in the form of Notices
+            # from the database server, so we need to append those outputs
+            # with the original result.
+            if result is None:
+                result = conn.status_message()
+                if result is not None and additional_messages is not None:
+                    result = additional_messages + result
+                else:
+                    result = result if result is not None \
+                        else additional_messages
+
         elif status == ASYNC_EXECUTION_ABORTED:
             status = 'Cancel'
         else:
diff --git a/web/pgadmin/tools/sqleditor/tests/test_view_data.py b/web/pgadmin/tools/sqleditor/tests/test_view_data.py
index dc96f9cd..b02e0e90 100644
--- a/web/pgadmin/tools/sqleditor/tests/test_view_data.py
+++ b/web/pgadmin/tools/sqleditor/tests/test_view_data.py
@@ -33,7 +33,7 @@ class TestViewData(BaseTestGenerator):
                 json_val json Not Null,
                 Constraint table_pk Primary Key(id)
                 );""",
-                result_data=None,
+                result_data='SELECT 0',
                 rows_fetched_to=0
             )
         )
diff --git a/web/pgadmin/tools/sqleditor/utils/tests/test_save_changed_data.py b/web/pgadmin/tools/sqleditor/utils/tests/test_save_changed_data.py
index 1745a990..8a4a0bd8 100644
--- a/web/pgadmin/tools/sqleditor/utils/tests/test_save_changed_data.py
+++ b/web/pgadmin/tools/sqleditor/utils/tests/test_save_changed_data.py
@@ -251,7 +251,7 @@ class TestSaveChangedData(BaseTestGenerator):
             },
             save_status=True,
             check_sql='SELECT * FROM %s WHERE pk_col = 2',
-            check_result=None
+            check_result='SELECT 0'
         )),
     ]
 
