# sql2000视图转换

sufull88 2013-01-31 09:47:32
MSSQL2000 (取所有列qty1、qty2、。。。。qty10不全为0的行)

materialid, qty1,qty2,qty3,qty4,qty5,qty6,qty7,qty8,qty9,qty10
1 ,0 , 1 , 1 , 0 , 0 ,0 ,0 ,0 , 0 , 0
2 ,1 , 0 , 0 , 0 , 0 ,0 ,0 ,0 , 0 , 0
7 ,0 , 0 , 0 , 0 , 0 ,0 ,0 ,0 , 0 , 1
8 ,0 , 0 , 0 , 0 , 0 ,0 ,0 ,0 , 0 , 0

materialid, qty1,qty2,qty3,qty4,qty5,qty6,qty7,qty8,qty9,qty10
1 ,0 , 1 , 1 , 0 , 0 ,0 ,0 ,0 , 0 , 0
2 ,1 , 0 , 0 , 0 , 0 ,0 ,0 ,0 , 0 , 0
7 ,0 , 0 , 0 , 0 , 0 ,0 ,0 ,0 , 0 , 1
...全文
207 1 点赞 打赏 收藏 举报

1 条回复

where qty1!=0 or qty2!=0 or...一直到10
• 打赏
• 举报

2.1w+

MS-SQL Server 疑难问题

2013-01-31 09:47