I was trying to insert the rows into one of the tables, and one of the GUID (Primary Key) cannot be inserted as it is generated automatically (no idea how) . . Is it allowable to do an insert ? Right now we are using a 4 hour process plus at least 3 people working instead we can make it one person with fraction of seconds.
Show us the DDL for the table. Are you sure the PK is a GUID and not an IDENTITY column?
GUID numeric(16,0) nulls(Yes) Primary key; unique identifier.
The table values are and so on
Show us the CREATE TABLE statement. What you posted is not a GUID/unique identifier. It appears it's an IDENTITY column that uses a 100000 increment.
This is what a uniqueidentifier looks like: 6F9619FF-8B86-D011-B42D-00C04FC964FF.
I cannot get the DDL statement, but here are the details of the columns of the table
GUID dbo.HVCIDdt:numeric(16, 0)
CatalogItemTaskGUID dbo.HVCIDdt:numeric(16, 0)
LocationGroupGUID dbo.HVCIDdt:numeric(16, 0)
Unfortunately that didn't help. Just right click on the table, select "Script Table as", "CREATE To" and then "Clipboard". Paste it here.
This will show us if GUID is an IDENTITY or not.
Alternatively, you could show us the error when you try to do an insert.
USE [CR2DEV29Daily] GO /****** Object: Table [dbo].[CV3CatalogTaskLocationXRef] Script Date: 12/15/2015 1:01:31 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[CV3CatalogTaskLocationXRef]( [SiteID] [smallint] NULL DEFAULT ([dbo].[SCMSiteIDFn]()), [RepFlags] [tinyint] NULL DEFAULT ((0)), [Build] [int] NOT NULL, [TouchedBy] [varchar](50) NULL, [TouchedWhen] [datetime] NULL DEFAULT (getdate()), [CreatedBy] [varchar](50) NULL, [CreatedWhen] [datetime] NULL DEFAULT (getdate()), [Active] [bit] NOT NULL, [GUID] [dbo].[HVCIDdt] NOT NULL, [CatalogItemTaskGUID] [dbo].[HVCIDdt] NULL, [LocationGroupGUID] [dbo].[HVCIDdt] NULL, [MSrepl_tran_version] [uniqueidentifier] NULL DEFAULT (newid()), CONSTRAINT [CV3CatalogTaskLocationXRefPK] PRIMARY KEY NONCLUSTERED ( [GUID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO
It appears you have a user-defined data type called [dbo].[HVCIDdt]. Locate the user-defined data type and show us the code. It's under Programmability/Types/User-Defined Data Types.
Thank you, I will post the insert query, I have to get 3 different values from other 4 tables to insert to this,