How can we help you today? How can we help you today?
bleitheiser
Hi Brian, How do I know if this is going to be an accepted enhancement? If possible, I would like to know if this is going to be done, or if I should look for other options. Thanks, Brandon / comments
Hi Brian, How do I know if this is going to be an accepted enhancement? If possible, I would like to know if this is going to be done, or if I should look for other options. Thanks, Brandon
0 votes
Hi Brian, Yes, that is exactly what I am looking for. If the table exists, then it would check to see if each column in that table exists, and if not then it would alter the table. Thanks, Brandon / comments
Hi Brian, Yes, that is exactly what I am looking for. If the table exists, then it would check to see if each column in that table exists, and if not then it would alter the table. Thanks, Brandon
0 votes
Here is a little bit of the script that i just created... PRINT N'Creating [dbo].[AccessorialDefinition]' GO IF OBJECT_ID(N'[dbo].[AccessorialDefinition]', 'U') IS NULL CREATE TABLE [dbo].[AccessorialDefinition] ( [ID] [int] NOT NULL IDENTITY(1, 1), [AccessorialCode] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [AccessorialDescription] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [CarrierCode] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [CarrierType] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [PlantID] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [AccessorialCalculationMethodCode] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [RangeType] [int] NULL, [Active] [bit] NULL, [AccessorialRateKeyID] [int] NULL ) GO @TRANCOUNT>0 ROLLBACK TRANSACTION GO @TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END GO PRINT N'Creating primary key [PK_AccessorialDefinition] on [dbo].[AccessorialDefinition]' GO IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = N'PK_AccessorialDefinition' AND object_id = OBJECT_ID(N'[dbo].[AccessorialDefinition]')) ALTER TABLE [dbo].[AccessorialDefinition] ADD CONSTRAINT [PK_AccessorialDefinition] PRIMARY KEY CLUSTERED ([ID]) GO @TRANCOUNT>0 ROLLBACK TRANSACTION GO @TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END GO PRINT N'Creating [dbo].[stp_InsertAccessorialDefinition]' GO IF OBJECT_ID(N'[dbo].[stp_InsertAccessorialDefinition]', 'P') IS NULL see how after checking if the table exists, it then goes to creating the stored procedures. Thanks, Brandon / comments
Here is a little bit of the script that i just created... PRINT N'Creating [dbo].[AccessorialDefinition]' GO IF OBJECT_ID(N'[dbo].[AccessorialDefinition]', 'U') IS NULL CREATE TABLE [dbo].[Accessor...
0 votes