diff --git a/lib/core/agent.py b/lib/core/agent.py
index 7027c64b8..412039cf4 100644
--- a/lib/core/agent.py
+++ b/lib/core/agent.py
@@ -444,19 +444,9 @@ class Agent(object):
return fieldsSelectFrom, fieldsSelect, fieldsNoSelect, fieldsSelectTop, fieldsSelectCase, fieldsToCastList, fieldsToCastStr, fieldsExists
- def simpleConcatQuery(self, query1, query2):
- concatenatedQuery = ""
-
- if Backend.isDbms(DBMS.MYSQL):
- concatenatedQuery = "CONCAT(%s,%s)" % (query1, query2)
-
- elif Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.ORACLE, DBMS.SQLITE, DBMS.DB2):
- concatenatedQuery = "%s||%s" % (query1, query2)
-
- elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE):
- concatenatedQuery = "%s+%s" % (query1, query2)
-
- return concatenatedQuery
+ def simpleConcatenate(self, first, second):
+ rootQuery = queries[Backend.getIdentifiedDbms()]
+ return rootQuery.concatenate.query % (first, second)
def concatQuery(self, query, unpack=True):
"""
diff --git a/plugins/generic/filesystem.py b/plugins/generic/filesystem.py
index 6c5d27e75..41a5d015a 100644
--- a/plugins/generic/filesystem.py
+++ b/plugins/generic/filesystem.py
@@ -97,7 +97,7 @@ class Filesystem:
if counter == 0:
sqlQueries.append("INSERT INTO %s(%s) VALUES (%s)" % (self.fileTblName, self.tblField, fcEncodedLine))
else:
- updatedField = agent.simpleConcatQuery(self.tblField, fcEncodedLine)
+ updatedField = agent.simpleConcatenate(self.tblField, fcEncodedLine)
sqlQueries.append("UPDATE %s SET %s=%s" % (self.fileTblName, self.tblField, updatedField))
counter += 1
diff --git a/xml/queries.xml b/xml/queries.xml
index 36a0fa9fe..25630719e 100644
--- a/xml/queries.xml
+++ b/xml/queries.xml
@@ -22,6 +22,7 @@
* http://dev.mysql.com/doc/refman/5.1/en/miscellaneous-functions.html#function_sleep
-->
+
@@ -95,6 +96,7 @@
* http://www.postgresql.org/docs/8.3/interactive/functions-datetime.html#FUNCTIONS-DATETIME-DELAY
-->
+
@@ -162,6 +164,7 @@
+
@@ -227,6 +230,7 @@
+
@@ -315,6 +319,7 @@
+
@@ -361,6 +366,7 @@
+
@@ -403,6 +409,7 @@
+
@@ -447,21 +454,23 @@
-
-
-
+
-
-
-
+
+
+
+
-
-
+
+
+
+
+
@@ -503,6 +512,7 @@
+
@@ -571,6 +581,7 @@
+