0
我周圍搜索,但無法找到類似的答案。SQL Server 2000:支持條件
推薦的最佳方法是在SQL Server 2000中使用條件來排除NULL和'NA'字符串?
我想從這個去(只選擇ORDER_ID = 100和LINE_NO = 1):
+----------+---------+-----+------+-----+------+----+
| order_id | line_no | a | b | c | d | e |
+----------+---------+-----+------+-----+------+----+
| 100 | 1 | 123 | NULL | NA | 456 | X1 |
| 101 | 1 | 789 | NA | 123 | NULL | BB |
+----------+---------+-----+------+-----+------+----+
要這樣:
+----------+---------+------+--------+
| order_id | line_no | type | config |
+----------+---------+------+--------+
| 100 | 1 | a | 123 |
| 100 | 1 | d | 456 |
| 100 | 1 | e | X1 |
+----------+---------+------+--------+