我有2个表格,数据如下: 传动和 TRANSD 表格可以在下面看到
当我使用如下语法时:
SELECT M.Kode_Project, M.Nama_Project, M.Kode_Panel,
M.Nama_Panel,D.Kode_Stater,
D.Nama_Stater1,
D.Tipe, D.Komponen, D.Pole, D.Amps, D.Merek, D.Qty,
D.IsTitipan
FROM TransM M
INNER JOIN TransD D
ON M.Kode_Project = D.Kode_Project
AND M.Kode_Panel = D.Kode_Panel
WHERE (M.Kode_Project = '17-0002')
AND (M.Kode_Panel = 'A')
我的语法错误是什么?请帮助我
答案 0 :(得分:0)
可能是您需要不同的结果(这应该删除重复的行)
SELECT DISTINCT
M.Kode_Project, M.Nama_Project, M.Kode_Panel,
M.Nama_Panel,D.Kode_Stater,
D.Nama_Stater1,
D.Tipe, D.Komponen, D.Pole, D.Amps, D.Merek, D.Qty,
D.IsTitipan
FROM TransM M
INNER JOIN TransD D
ON M.Kode_Project = D.Kode_Project
AND M.Kode_Panel = D.Kode_Panel
WHERE (M.Kode_Project = '17-0002')
AND (M.Kode_Panel = 'A')