sql-order-by
2013-03-02 40 views 0 likes 
0
qry1 = "Select * from ser_complaint_master a,ser_complaint_status b,company_master c 
     where a.complaint_no=b.complaint_no 
     and a.allocation_code=c.co_code 
     and c.co_br_code='" + Session["BRCODE"] + "' 
     and a.Complaint_Date>='" + Frdat + "' and a.Complaint_Date<='" + Todat + "' 
     and a.status in ('Completed') 
     and a.complaint_type in('" + cmptype + "')"; 

如何在選擇查詢中使用ORDER BY(如果涉及多個表)。如何使用order by sql選擇查詢以升序排序投訴

回答

2

order by a.complaint_no添加到查詢的末尾。

相關問題