SQL tempdb collation
When there are collation differences between SQL Server tempdb and SyteLine databases, SQL may generate exceptions similar to "Cannot resolve collation conflict between 'SQL_Latin1_General_CP1_CI_AS' and 'Estonian_CS_AS' in equal to operation."
Column definitions of tempdb tables require COLLATE DATABASE_DEFAULT for the CHAR, VARCHAR, TEXT, NCHAR, NVARCHAR, and SYSNAME data type column of temp table.
Example:
CREATE TABLE #Tmp_Apptcd(
Type Nvarchar(2) COLLATE DATABASE_DEFAULT,
Ref Nvarchar(30) COLLATE DATABASE_DEFAULT,
ApRef Nvarchar(100) COLLATE DATABASE_DEFAULT,
VendInv Nvarchar(22) COLLATE DATABASE_DEFAULT,
InvDate DateTime,
GrossAmt Decimal(21,8),
DomAmtPaid Decimal(21,8),
WhtAmt Decimal(21,8),
TaxCode Nvarchar(6) COLLATE DATABASE_DEFAULT,
VendNum Nvarchar(7) COLLATE DATABASE_DEFAULT,
WhtGrossAmt Decimal(21,8),
ApptcRowPointer UniqueIdentifier)