Querying data using SQL statements in Excel (v)

Source: Internet
Author: User

The data query statement we are going to share today is union all, which is used to concatenate disjoint fields. In combination with the UNION ALL statement, we also need to define names for different regions . As defined in January, the name is JAN and February is defined as the Feb

650) this.width=650; "style=" Float:none; "title=" 21.JPG "src=" http://s3.51cto.com/wyfs02/M01/6D/56/ Wkiom1vhy3aicd18aak_agr5kyq629.jpg "alt=" Wkiom1vhy3aicd18aak_agr5kyq629.jpg "/>

Define the name process as follows

650) this.width=650; "style=" Float:none; "title=" 22.JPG "src=" http://s3.51cto.com/wyfs02/M02/6D/51/ Wkiol1vhzqoqif3maagma9fh1wk056.jpg "alt=" Wkiol1vhzqoqif3maagma9fh1wk056.jpg "/>

Then, you create the data connection in OLE DB mode. Please see the previous blog post for the process. is entered in the command window

SELECT * from JAN

UNION All

SELECT * from FEB

650) this.width=650; "style=" Float:none; "title=" 24.JPG "src=" http://s3.51cto.com/wyfs02/M00/6D/51/ Wkiol1vhzqosj-6oaag8ebdpzsa128.jpg "alt=" Wkiol1vhzqosj-6oaag8ebdpzsa128.jpg "/>

After executing the command, the result is as follows

650) this.width=650; "style=" Float:none; "title=" 25.JPG "src=" http://s3.51cto.com/wyfs02/M00/6D/56/ Wkiom1vhy3eip8p2aainblwq2gi271.jpg "alt=" Wkiom1vhy3eip8p2aainblwq2gi271.jpg "/>

We can practice a lot.

This article is from the "Guo Yong Technology blog" blog, make sure to keep this source http://guoyong.blog.51cto.com/408495/1654661

Querying data using SQL statements in Excel (v)

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.