Activity overview
Latest activity by 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
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
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...
Hi Brian,
It is NOT being altered. There is only a check if the table exist. Right now, it checks if the table exists don't do anything else create it...
It is NOT checking the column level after checking the table level.
Brandon / comments
Hi Brian,
It is NOT being altered. There is only a check if the table exist. Right now, it checks if the table exists don't do anything else create it...
It is NOT checking the column level after...
Hi Brian,
I am posting this, because it is NOT doing it. It is only checking the table.
Shall I provide an example?
Thanks,
Brandon / comments
Hi Brian,
I am posting this, because it is NOT doing it. It is only checking the table.
Shall I provide an example?
Thanks,
Brandon
Hi Brian,
SQL Server let's you check the column to see if it exists...
The problem is if you use the SQL Compare 10 option "Add object exsistence checks" it only checks the object at the table level. Meaning, it only checks to see if the table exists. If it does, then it does nothing and moves on, if it does not exist then it creates the table. But really, there is functionality lacking here.
What if the table exists, but the column does not?
To me the workflow should be like this:
Check if table exists
If false then create table with all columns.
If TRUE then do this:
Check each column in the table to see if it exists
If it does not exist
alter the table to create the new column
If it does exist
check the next column in line.
This would be really helpful if a user in unable to get the customers database to do a compare on it. This way, you could easily create one script to upgrade any customer to the latest no matter what version their database was on. / comments
Hi Brian,
SQL Server let's you check the column to see if it exists...
The problem is if you use the SQL Compare 10 option "Add object exsistence checks" it only checks the object at the table leve...
If exist checks only go to the table level...
I am trying to figure out the easiest way to upgrade all of my customers to the latest schema.
I thought of a way to do this but I am having trouble getting it to work using SQL Compare.
What I wan...
How to remove sql prompt 5
I have purchased the RED Gate SQL COmpare utility and I also tried the sql prompt plug in as well as sql refactor. Since I have installed those my Sql Enterprise Manager has been running very slow...