private void GetCustomerPerformanceGuide(string tbDelivery) { string Month = MM.Replace("0", ""); sb.Length = 0; sb.AppendFormat(" SELECT a.Customer_ID, m{0} as 金额", Month); sb.AppendLine(" INTO " + tbDelivery); sb.AppendLine(" FROM CustomerPerformanceGuide A "); sb.AppendFormat(" WHERE a. Year='{0}' \n", yyyy); sb.AppendLine(" And Exists(Select 1 from " + tbCustomerFilter + " CT where A.Customer_ID = CT.ID)"); da.ExecuteNonQuery(sb.ToString()); }