Skip to content
This repository has been archived by the owner on Feb 24, 2019. It is now read-only.

Update shared.ps1 function Initialize-Datatable #97

Open
wants to merge 1 commit into
base: Development
Choose a base branch
from

Conversation

DiHo78
Copy link

@DiHo78 DiHo78 commented Dec 8, 2018

Added datatype decimal to the function to avoid error when running job dbareports - Disk Usage
Error from pshell logging is: ERROR: Bulk insert failed - Exception calling "ExecuteNonQuery" with "0" argument(s): "Error converting data type nvarchar to numeric.
The data for table-valued parameter "@tvp" doesn't conform to the table type of the parameter. SQL Server error is: 8114, state: 5
The statement has been terminated."

In the background a conversion error (nvarchar to numeric) is thrown

Fixes # .

Changes proposed in this pull request:

How to test this code:

Has been tested on (remove any that don't apply):

  • Case-sensitive SQL Server instance
  • SQL Server 2008
  • SQL Server 2008 R2
  • SQL Server 2012
  • SQL Server 2014
  • SQL Server 2016
  • Amazon RDS
  • Azure SQL DB

Added datatype decimal to the function to avoid error when running job dbareports - Disk Usage
Error from pshell logging is: ERROR: Bulk insert failed - Exception calling "ExecuteNonQuery" with "0" argument(s): "Error converting data type nvarchar to numeric.
The data for table-valued parameter "@tvp" doesn't conform to the table type of the parameter. SQL Server error is: 8114, state: 5
The statement has been terminated." 

In the background a conversion error (nvarchar to numeric) is thrown
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant