summaryrefslogtreecommitdiff
path: root/Gestor.Application.Migration.Files.20210510_118.SQL
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Application.Migration.Files.20210510_118.SQL')
-rw-r--r--Gestor.Application.Migration.Files.20210510_118.SQL8
1 files changed, 8 insertions, 0 deletions
diff --git a/Gestor.Application.Migration.Files.20210510_118.SQL b/Gestor.Application.Migration.Files.20210510_118.SQL
new file mode 100644
index 0000000..3cc72dc
--- /dev/null
+++ b/Gestor.Application.Migration.Files.20210510_118.SQL
@@ -0,0 +1,8 @@
+DECLARE @col_length nvarchar(max)
+
+SELECT @col_length = COL_LENGTH('[dbo].[adiantamento]', 'datapgt')
+
+DECLARE @sql NVARCHAR(MAX) = N'UPDATE adiantamento SET Pagamento = datapgt WHERE Pagamento IS NULL AND datapgt IS NOT NULL;'
+
+IF @col_length IS NOT NULL
+ exec sp_executesql @sql \ No newline at end of file