Noreen McHugh
asked on
Collation error when importing
HI
I am trying to import data from a sql 2005 server instance to a table on sql 2008 via a linked server. The code is attached.
I am getting a collation error, see below. However I have imported other data from a view on the 2005 sql to the 2008 sql with no problems. I am unsure what I need to do to resolve this.
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI _AS" and "Latin1_General_CI_AS" in the EXCEPT operation.
I am trying to import data from a sql 2005 server instance to a table on sql 2008 via a linked server. The code is attached.
I am getting a collation error, see below. However I have imported other data from a view on the 2005 sql to the 2008 sql with no problems. I am unsure what I need to do to resolve this.
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI
INSERT INTO [PJ Combined Sales].[dbo].[AndroRefunds]
([FiscalDate]
,[RestaurantCode]
,[Type]
,[Amount]
,[Description])
SELECT
[TheDate]
,[nStoreID]
,[nType]
,sum([nAmount])/100.00 as Refunds
,[strDetails]
FROM [WORKSPJ1].[HeadOffice].[dbo].[t_CashRec]
WHERE ([strDetails] LIKE '%ref%') AND ([nType] = '1')
AND NOT EXISTS
(SELECT x.[FiscalDate], x.[RestaurantCode]
FROM [PJ Combined Sales].[dbo].[AndroRefunds] as x
WHERE x.[Fiscaldate]= [TheDate]
and x.[RestaurantCode] = [nStoreID])
GROUP BY [TheDate],[nStoreID],[nType],[strDetails]
EXCEPT
SELECT [FiscalDate],
[RestaurantCode],
[Type],
[Amount],
[Description]
FROM [PJ Combined Sales].[dbo].[AndroRefunds]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Great! Glad I could help...
have a great day
have a great day
ASKER