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)