Deleting table columns
Comments
-
Hi Support,
How do i configure Decisions to remove table columns. In addition to this is there a way to move data from one table to another?
Thanks in advance.
[i]edited by KempthamL on 12/9/2019[/i] -
[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]Hi Lee, [/font][/color]
[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]
[/font][/color]
[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif][i]Please note before making any database and table changes we advise to backup your database. While also making sure any deleted columns are not in use by any datatypes. [/i][/font][/color]
[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]
[/font][/color]
[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]To delete table columns you will need to create a Run Defined Query step to run a custom defined query containing an alter table statement.[/font][/color][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]Moving data from one table to another can be achieved by retrieving all existing table data via a defined query such as select * from table which can be looped and output into a CSV file. This can then be used in conjunction with a CSV to database mapping step to loop through the CSV rows to build inputs for a stored query with a parameterized insert statement.[/font][/color]
[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]Alternatively a table script from within SQL Server Management Studio can be run on the server.[/font][/color]
[color=#222222]
[/color]
[color=#222222]Further details can be found here: [/color][url=https://documentation.decisions.com/docs/changing-data-fields]https://documentation.decisions.com/docs/changing-data-fields[/url][color=#222222]
[/color][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]
[/font][/color]
[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]I hope this helps,[/font][/color]
[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]Tim Wilde[/font][/color]
[i]edited by tim@decisions.com on 12/11/2019[/i]