請協助一下,以下二種語句那些錯誤了
SELECT 廠商&制單,物料編號,數量,"1月入庫",* FROM [1月入庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"1月出庫",* FROM [1月出庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"2月入庫",* FROM [2月入庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"2月出庫",* FROM [2月出庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"3月入庫",* FROM [3月入庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"3月出庫",* FROM [3月出庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"4月入庫",* FROM [4月入庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"4月出庫",* FROM [4月出庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"5月入庫",* FROM [5月入庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"5月出庫",* FROM [5月出庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"6月入庫",* FROM [6月入庫$A:J] UNION ALL SELECT 廠商&制單,物料編號,數量,"6月出庫",* FROM [6月出庫$A:J]
SELECT 廠商&制單&制單,物料編號,數量,"1月入庫",* FROM [1月入庫$A:J] UNION ALL SELECT "1月出庫",* FROM [1月出庫$A:J] UNION ALL SELECT "2月入庫",* FROM [2月入庫$A:J] UNION ALL SELECT "2月出庫",* FROM [2月出庫$A:J] UNION ALL SELECT "3月入庫",* FROM [3月入庫$A:J] UNION ALL SELECT "3月出庫",* FROM [3月出庫$A:J] UNION ALL SELECT "4月入庫",* FROM [4月入庫$A:J] UNION ALL SELECT "4月出庫",* FROM [4月出庫$A:J] UNION ALL SELECT "5月入庫",* FROM [5月入庫$A:J] UNION ALL SELECT "5月出庫",* FROM [5月出庫$A:J] UNION ALL SELECT "6月入庫",* FROM [6月入庫$A:J] UNION ALL SELECT "6月出庫",* FROM [6月出庫$A:J] |