我在 aspx 页面中有两个下拉框。一个用于位置,一个用于供应商列表。我正在从此位置的下拉列表中获取值
SELECT Location_ID LocationID, Location_Name LocationDesc, BusinessID
FROM inventory.tbl_location
union
SELECT '' LocationID,'select a location' LocationDesc,0 BusinessID
ORDER BY BusinessID,Location_Name
我可以从中获取供应商下拉列表中所有记录的列表:
SELECT p.PayeeID, isnull(Name1_Last,'') + ', ' + isnull(Name1_First,'') VendorName, b.BusinessID
from tblVendor_Payees p join tblVendor_Business b
on p.PayeeID=b.PayeeID
where VendorType=1
order by isnull(Name1_Last,'') + ', ' + isnull(Name1_First,'')
我只想根据位置下拉列表列出那些供应商记录。怎么做?。