Insert into的写法

 

INSERT INTO dbo.DM_T_RWX_UserProductSerialCodeInfo(userid,ProductSerialCode,count) SELECT TOP 10 userid,productserialcode,SUM([COUNT])AS cnt FROM dbo.DM_RW_UserItemsInfo GROUP BY userid,ProductSerialCode

 

Sqlserver 2005 PIVOT来进行行列转换,方便很,看了很多往篇文章,这篇是最易懂的

SQL SERVER行转列应用小结

 

Download details: SQL Server 2005 Samples and Sample Databases

SQL Server 2-D Matrix Builder

Microsoft SQL Server Product Samples: Database - Release: SQL Server 2005 SP2a

相关文章:

  • 2022-12-23
  • 2021-07-10
  • 2021-11-04
  • 2022-02-23
  • 2021-07-29
  • 2022-12-23
  • 2021-08-09
猜你喜欢
  • 2022-03-06
  • 2021-10-01
  • 2021-08-26
  • 2021-05-25
  • 2021-10-22
  • 2021-05-15
相关资源
相似解决方案