diff --git a/Jobs/GraphQL/GraphQLJob.vb b/Jobs/GraphQL/GraphQLJob.vb index 9d43d135..32570952 100644 --- a/Jobs/GraphQL/GraphQLJob.vb +++ b/Jobs/GraphQL/GraphQLJob.vb @@ -120,7 +120,7 @@ Public Class GraphQLJob ' Clear Table before inserting If pQuery.ClearBeforeFill = True Then - If DeleteWithQueryName(pQuery) Then + If DeleteWithQueryName(pQuery) = False Then Throw New ApplicationException($"Error while clearing table before fill for Query [{pQuery.Name}]") End If End If @@ -198,7 +198,7 @@ Public Class GraphQLJob End Function Private Function DeleteWithQueryName(pQuery) - Dim oDeleteSQL = $"DELETE FROM {pQuery.DestinationTable}" + Dim oDeleteSQL = $"TRUNCATE TABLE {pQuery.DestinationTable}" Return _MSSQL.ExecuteNonQuery(oDeleteSQL) End Function