Background: I encountered the problem of data merging and splitting today. I tried several writing methods. However, it can be roughly divided into two categories: 1. Original writing. Ii. Supported syntax after SqlServer2005. The first method is complex and inefficient. It is not recommended. The second method is described below. Data Splitting: first, we will introduce two functions: cross.
Background: I encountered the problem of data merging and splitting today. I tried several writing methods. However, it can be roughly divided into two categories: 1. Original writing. Ii. supported statements after SQL Server 2005. The first method is complex and inefficient. It is not recommended. The second method is described below. Data Splitting: first, we will introduce two functions: cross.
Background:
Today, I encountered the problem of data merging and splitting and tried several writing methods. However, it can be roughly divided into two categories: 1. Original writing. Ii. supported statements after SQL Server 2005. The first method is complex and inefficient. Hong Kong space is not recommended. The second method is described below.
Data Splitting:
Before sharding, we will first introduce two functions: cross apply and outer apply. These two functions are used for cross-join. These two functions are available only after SQL server 2005. The website space is similar to the cross join function in SQL server 2000. Although similar, Hong Kong servers are rented, cross join has a fatal feature defect. For details, see the code:
TEST01 AS T01 cross join FUNC_TB2 (T01.FIELD1) -- FUNC_TB2 is a table Value Function