请帮我修改下sql语句的排序?
下面是我的SQL语句,
SELECT Ci.co_cust_num, Jr.wc, KDc.Co_Num, KDc.Co_line, Caa.attr_value AS Color,
Ci.due_date, Jr.job, Jr.suffix, J.item, J.description, J.qty_released, J.qty_complete,
Js.start_date, Js.end_date, Jm.item AS JmItem, Jm.description AS JmDes,
Jm.scrap_fact, J1.config_id, Caa1.attr_value
FROM dbo.cfg_attr_all Caa1 INNER JOIN
dbo.coitem Ci INNER JOIN
dbo.KDcoitem KDc ON Ci.co_num = KDc.Co_Num AND Ci.co_line = KDc.Co_line ON
Caa1.config_id = KDc.config_id AND Caa1.attr_name = 'remarks ' INNER JOIN
dbo.job_sch Js INNER JOIN
dbo.job J INNER JOIN
dbo.jobroute Jr ON J.job = Jr.job AND J.suffix = Jr.suffix AND J.type = 'J ' INNER JOIN
dbo.jobmatl Jm ON Jr.job = Jm.job AND Jr.suffix = Jm.suffix INNER JOIN
dbo.job J1 ON J.est_job = J1.job AND J.est_suf = J1.suffix ON Js.job = Jr.job AND
Js.suffix = Jr.suffix INNER JOIN
dbo.cfg_attr_all Caa ON J1.config_id = Caa.config_id AND Caa.attr_name = 'color ' AND
ISNULL(Caa.attr_value, 'T ') <> 'T ' ON KDc.Old_Co_Num = J1.ord_num AND
KDc.Old_Co_Line = J1.ord_line
WHERE (Jr.wc = N 'NC_01 ') AND (J.type = 'J ')and Kdc.co_num= 'C070100030 '
order by KDc.co_num,Kdc.co_line
下面是运行后的结果:
co_cust_num wc Co_Num Co_line Color ...
KEE0201 NC_01 C070100030 1 k2360 ...
KEE0201 NC_01 C070100030 2 k2360 ...
KEE0201 NC_01 C070100030 3 k2360 ...
KEE0201 NC_01 C070100030 4 k2360 ...
KEE0201 NC_01 C070100030 5 k2360