Excel replication SQL query Results misplaced

Source: Internet
Author: User


SELECT TOP 30000

Replace (replace (T1. Receivername,char (Ten), '), CHAR (+), ') as Receivername,

Replace (replace (Receivercompany,char (), '), CHAR (+), ') as Receivercompany,

Replace (replace (T1. Receiverphone,char (Ten), '), CHAR (+), ') as Receiverphone,

Replace (replace (T1. Receivercity,char (Ten), '), CHAR (+), ') as Receivercity,

Replace (replace (T1. Receiverzipcode,char (Ten), '), CHAR (+), ') as Receiverzipcode,

Replace (replace (T1. Receiverstate,char (Ten), '), CHAR (+), ') as Receiverstate,

Case when T2. Chinesename= ' Germany ' then 1
When T2. Chinesename= ' Italy ' then 2
When T2. Chinesename= ' France ' then 3
When T2. Chinesename= ' Russia ' then 4
When T2. Chinesename= ' UK ' then 5
When T2. Chinesename= ' America ' then 6
When T2. Chinesename= ' Australia ' then 7
When T2. Chinesename= ' Brazil ' then 8
When T2. Chinesename= ' Chile ' then 9
When T2. Chinesename= ' Israel ' then 10
When T2. Chinesename= ' Holland ' then 11
When T2. Chinesename= ' Spain ' then 12
When T2. Chinesename= ' Canada ' then 13
END as Continent
From Logistics.express T0 INNER joins 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

Excel replication SQL query Results misplaced

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.