In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "the method of sql multi-table row transfer and cascade row transfer". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor to take you to learn the "sql multi-table row transfer and cascading row transfer method"!
There are two tables A, A, B, A, B, A, A, B, B, A, B, A, B, B, A, B, Table B is required to display a list of clicks on all items of the day with the following code: declare @ sql varchar (2000) set @ sql='select CONVERT (varchar, a. [Time], 23) as time, total count (b.title) as' select @ sql= @ sql+' Sum (case b.title when''+ Title+''' then 1 else 0 end) as'+ ['+ Title+'] 'from (select distinct title from B) as B set @ sql=@sql+' from An as a left join B as b on a.AId=B.Aid group by CONVERT (varchar, a. [Time], 23) order by CONVERT (varchar (100), a. [Time], 23) desc' exec (@ sql)
Display result time Total Commodity 1 Commodity 2 Commodity 32013-11-1151042013-11-10132111
At this point, I believe that everyone on the "sql multi-table row transfer and cascade row transfer method" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.