我在我生成該表中我不得不移除重複值的臨時表的場景中的所有列使空值....SQL中具有相同的值
id Ref_No css_no haz_no Emp_no X-Fac Y-Fac Location street_name Locale town_name admin_area
341139 317000334 NULL NULL 37101195 588550.00 185922.00 SUTTON ROAD SOUTHEND-ON-SEA SOUTHEND-ON-SEA
477641 317000334 NULL NULL 37100003 582297.00 582297.00 ttttttttttttttttttttttttttttttttttttttttttttttttt..... ABERDEEN GARDENS LEIGH-ON-SEA SOUTHEND-ON-SEA
477641 317000334 NULL NULL 37100003 85000.00 85000.00 ttttttttttttttttttttttttttttttttttttttttttttttttt..... ABERDEEN GARDENS LEIGH-ON-SEA SOUTHEND-ON-SEA
477641 317000334 NULL NULL 37100003 85000.00 85000.00 ttttttttttttttttttttttttttttttttttttttttttttttttt..... ABERDEEN GARDENS LEIGH-ON-SEA SOUTHEND-ON-SEA
477649 317000334 NULL NULL 37100004 591278.00 591278.00 aaaaaaaaaaaaaaaaaaaa ACACIA DRIVE THORPE BAY SOUTHEND-ON-SEA SOUTHEND-ON-SEA
477651 317000334 NULL NULL 37101738 593365.00 593365.00 adfasdsfwerwer ADJACENT TO 51 SANDPIPER CLOSE SHOEBURYNESS SOUTHEND-ON-SEA SOUTHEND-ON-SEA
477661 317000334 NULL NULL 37100036 589791.00 187149.00 ARCHER AVENUE SOUTHEND-ON-SEA SOUTHEND-ON-SEA
487012 317000334 NULL NULL 42203885 359280.00 359280.00 yuiuyiuy ABERDARE CLOSE BURTONWOOD AND WESTBROOK WARRINGTON WARRINGTON
我想此表輸出......
id Ref_No css_no haz_no Emp_no X-Fac Y-Fac Location street_name Locale town_name admin_area
341139 317000334 NULL NULL 37101195 588550.00 185922.00 SUTTON ROAD SOUTHEND-ON-SEA SOUTHEND-ON-SEA
477641 317000334 NULL NULL 37100003 582297.00 582297.00 ttttttttttttttttttttttttttttttttttttttttttttttttt..... ABERDEEN GARDENS LEIGH-ON-SEA SOUTHEND-ON-SEA
NULL NULL 85000.00 85000.00
NULL NULL 85000.00 85000.00
477649 317000334 NULL NULL 37100004 591278.00 591278.00 aaaaaaaaaaaaaaaaaaaa ACACIA DRIVE THORPE BAY SOUTHEND-ON-SEA SOUTHEND-ON-SEA
477651 317000334 NULL NULL 37101738 593365.00 593365.00 adfasdsfwerwer ADJACENT TO 51 SANDPIPER CLOSE SHOEBURYNESS SOUTHEND-ON-SEA SOUTHEND-ON-SEA
477661 317000334 NULL NULL 37100036 589791.00 187149.00 ARCHER AVENUE SOUTHEND-ON-SEA SOUTHEND-ON-SEA
487012 317000334 NULL NULL 42203885 359280.00 359280.00 yuiuyiuy ABERDARE CLOSE BURTONWOOD AND WESTBROOK WARRINGTON WARRINGTON
像明智我需要刪除其再次返回阿恩爲同一infomartion價值......任何一個可以幫我這個....和該表將根據每次的條件生成,因此所有時間的值可能不相同...
[你有什麼嘗試](http://whathaveyoutried.com)? – Oded
其實我仍然在微調上述的表格生成...我無法專注於它如何刪除cols因此只發布...每個條目X-fac和Y-fac將是獨特的... –
How桌子很大?你可以用'SELECT DISTINCT * FROM temp'將它包裝在CTE中嗎? –