HR & Payroll


A Get/Change operation on table 'HR_Union' failed accessing SQL data



You get the below details when you press the button More info



Cause:
This happens when you upgrade HR&Payroll from GP 2013 to GP 2015 R2

In GP 2010 version the column was not there
In GP 2013 version the column was there
and of course in GP 2015 and GP 2016 the column was there.

It looks like Microsoft added it in GP 2013 and with the upgrade something happened where now the table is in the incorrect format.


Table affected - HR_Union - HR2UNI01



Solution-1:
If there is no data in the table then you can recreate it though the following process
Go To - Microsoft Dynamics GP-->Maintenance-->SQL-->SQL Maintenance

Select the Table HR_Union and check the option Create Table, Drop Table and click on process once this is done this error will be gone

Solution -2:
You can use the below script and create the table


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING OFF
GO

CREATE TABLE [dbo].[HR2UNI01](
            [EMPID_I] [char](15) NOT NULL,
            [SENIORITYDATE_I] [datetime] NOT NULL,
            [STRTDATE] [datetime] NOT NULL,
            [ENDDATE] [datetime] NOT NULL,
            [UNIONNAME_I] [char](31) NOT NULL,
            [UNIONDUESAMOUNT_I] [numeric](19, 5) NOT NULL,
            [NOTESINDEX_I] [numeric](19, 5) NOT NULL,
            [CHANGEBY_I] [char](15) NOT NULL,
            [CHANGEDATE_I] [datetime] NOT NULL,
            [CONTACTNUM_I] [char](31) NOT NULL,
            [DEX_ROW_ID] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [PKHR2UNI01] PRIMARY KEY CLUSTERED
(
            [EMPID_I] 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

ALTER TABLE [dbo].[HR2UNI01]  WITH CHECK ADD CHECK  ((datepart(hour,[CHANGEDATE_I])=(0) AND datepart(minute,[CHANGEDATE_I])=(0) AND datepart(second,[CHANGEDATE_I])=(0) AND datepart(millisecond,[CHANGEDATE_I])=(0)))
GO

ALTER TABLE [dbo].[HR2UNI01]  WITH CHECK ADD CHECK  ((datepart(hour,[ENDDATE])=(0) AND datepart(minute,[ENDDATE])=(0) AND datepart(second,[ENDDATE])=(0) AND datepart(millisecond,[ENDDATE])=(0)))
GO

ALTER TABLE [dbo].[HR2UNI01]  WITH CHECK ADD CHECK  ((datepart(hour,[SENIORITYDATE_I])=(0) AND datepart(minute,[SENIORITYDATE_I])=(0) AND datepart(second,[SENIORITYDATE_I])=(0) AND datepart(millisecond,[SENIORITYDATE_I])=(0)))
GO

ALTER TABLE [dbo].[HR2UNI01]  WITH CHECK ADD CHECK  ((datepart(hour,[STRTDATE])=(0) AND datepart(minute,[STRTDATE])=(0) AND datepart(second,[STRTDATE])=(0) AND datepart(millisecond,[STRTDATE])=(0)))
GO

No comments:

Post a Comment