Create Procedure [GetTable] @zkhi char (10) AS
SELECT ZKH, XM, F1, F2, F3, F4, F5, F6, F7, F8,
Table21.km as km1,
Table22.km AS KM2,
Table23.km as km3
From table1
Left join table2 as table21 on table1.kc1 = Table21.kc
Join table2 as table22 on table1.kc2 = Table22.kc
Join table2 as table23 on table1.kc3 = Table23.kc
WHERE
ZKH = @ zkhi
Go
Which master helps me see where the problem is, no grammar, but it is not the result.