下面sql语句写成一句,在线等,高手指教
Sql_W="select a.SupplierID from Workers as a,[User] as b where a.User_id=b.User_id and b.User_name='"& rs("User_name") &"' and b.User_pwd='"& User_pwd &"'"
Sql_S="Select SupplierID,Name,English_Name from Supplier where SupplierID="& SupplierID &""
这条两条sql我想写成一条,请高手出招!!谢谢
------解决方案--------------------
--try
Sql_S="Select SupplierID,Name,English_Name from Supplier where SupplierID in (select a.SupplierID from Workers as a,[User] as b where a.User_id=b.User_id and b.User_name='"& rs("User_name") &"' and b.User_pwd='"& User_pwd &"'"