SELECT TOP 30000
REPLACE(REPLACE(T1.ReceiverName,CHAR(10),' '),CHAR(13),' ') AS ReceiverName,
REPLACE(REPLACE(ReceiverCompany,CHAR(10),' '),CHAR(13),' ') AS ReceiverCompany,
REPLACE(REPLACE(T1.ReceiverPhone,CHAR(10),' '),CHAR(13),' ') AS ReceiverPhone,
REPLACE(REPLACE(T1.ReceiverCity,CHAR(10),' '),CHAR(13),' ') AS ReceiverCity,
REPLACE(REPLACE(T1.ReceiverZipcode,CHAR(10),' '),CHAR(13),' ') AS ReceiverZipcode,
REPLACE(REPLACE(T1.ReceiverState,CHAR(10),' '),CHAR(13),' ') AS ReceiverState,
CASE WHEN T2.ChineseName='德国' THEN 1
WHEN T2.ChineseName='意大利'THEN 2
WHEN T2.ChineseName='法国'THEN 3
WHEN T2.ChineseName='俄罗斯'THEN 4
WHEN T2.ChineseName='英国'THEN 5
WHEN T2.ChineseName='美国'THEN 6
WHEN T2.ChineseName='澳大利亚'THEN 7
WHEN T2.ChineseName='巴西'THEN 8
WHEN T2.ChineseName='智利'THEN 9
WHEN T2.ChineseName='以色列'THEN 10
WHEN T2.ChineseName='荷兰'THEN 11
WHEN T2.ChineseName='西班牙'THEN 12
WHEN T2.ChineseName='加拿大'THEN 13
END as Continent
FROM Logistics.Express T0 INNER JOIN Logistics.ExpressCustomForRu T1 ON T0.WaybillNumber = T1.WaybillNumber
INNER JOIN BasicSetup.Region T2 ON T0.RegionId = T2.Id
inner join [HumanResource].[Company] t3 on t0.CompanyId=t3.Id
where t0.ChannelId=131 or t0.ChannelId=132