Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kerrinbanner
Starting Member
1 Post |
Posted - 2009-10-13 : 19:39:24
|
| HelloI am new to SQL. I have used a differencing tool to create a script which will be used to update a database schema. I wish to manually edit it to update the value in a field: My question is two fold: Where in the existing script should I insert it and secondly what to add to update the field value: I have attached the script I believe I wish to insert and an excerpt of the script automatically generated. Please can anyone tell me where to insert the sql script please?Thanks KerrinHERE IS THE SCRIPT I BELIEVE I WANT TO ADD ( WHERE DO I ADD IT AND IS IT CORRCT ALSO?)SCRIPT TO BE INSERTED IN TO CODE BELOWUSE trackersqlUPDATE Tbl_AlarmsSet MainCategory='Intruder'WHERE MainCategory=NULLHERE IS THE AUTO GENERATED SCRIPT INTO WHICH I WISH TO INSERT THE CODE ABOVE/* ------------------------------------------------------------DESCRIPTION: Schema Synchronization Script for Object(s)tables:[dbo].[Tbl_AlarmComponents], [dbo].[Tbl_Alarms], [dbo].[Tbl_Company_Info], [dbo].[Tbl_Devices], [dbo].[Tbl_Job], [dbo].[Tbl_JobCosting], [dbo].[Tbl_Keyholders], [dbo].[Tbl_Quote], [dbo].[Tbl_QuoteCosting]Make WIN-7ESGOGRYKDN.trackerSQL Equal WIN-7ESGOGRYKDN.trackerSQLAUTHOR: Kerrin BannerDATE: 13/10/2009 00:06:37LEGAL: XXXXX.------------------------------------------------------------ */SET NOEXEC OFFSET ANSI_WARNINGS ONSET XACT_ABORT ONSET IMPLICIT_TRANSACTIONS OFFSET ARITHABORT ONSET NOCOUNT ONSET QUOTED_IDENTIFIER ONSET NUMERIC_ROUNDABORT OFFSET CONCAT_NULL_YIELDS_NULL ONSET ANSI_NULLS ONSET ANSI_PADDING ONGOUSE [trackerSQL]GOBEGIN TRANGO-- Drop Extended Property MS_ColumnHeads from Tbl_AlarmComponentsPrint 'Drop Extended Property MS_ColumnHeads from Tbl_AlarmComponents'GOEXEC sp_dropextendedproperty N'MS_ColumnHeads', 'SCHEMA', N'dbo', 'TABLE', N'Tbl_AlarmComponents', 'COLUMN', N'Supplier'GOIF @@ERROR<>0 OR @@TRANCOUNT=0 BEGIN IF @@TRANCOUNT>0 ROLLBACK SET NOEXEC ON ENDGO-- Drop Extended Property ColumnOrder from Tbl_AlarmComponentsPrint 'Drop Extended Property ColumnOrder from Tbl_AlarmComponents'GOEXEC sp_dropextendedproperty N'ColumnOrder', 'SCHEMA', N'dbo', 'TABLE', N'Tbl_AlarmComponents', 'COLUMN', N'CCTVMemo'GOIF @@TRANCOUNT>0COMMITSET NOEXEC OFFKerrin S Banner |
|
|
|
|
|
|
|