Weste Posted October 31, 2006 Posted October 31, 2006 I have 2 list boxes bound to a database. The 1st list box displays services ordered by the customer. I want the 2nd list box to display services not yet ordered by the customer. For example. My services are A, B, C, D and the customer has ordered A and B. List box 1 should show A, B List box 2 should show C,D I have list box 1 working. Can someone give me some help as to how I need to setup the query for list box 2? Thanks for your help. Weste Quote
Weste Posted November 1, 2006 Author Posted November 1, 2006 Problem Solved! The query below solved by problem. SELECT Services.ServiceID, Services.ServiceName FROM Services LEFT JOIN (SELECT ServiceSales.SalesID, ServiceSales.ServiceID FROM ServiceSales WHERE ServiceSales.SalesID = @Param1) AS B ON Services.ServiceID = B.ServiceID WHERE B.ServiceID Is Null Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.