ShadowMage Posted November 3, 2023 Share Posted November 3, 2023 I have two tables: OrderHed and OrderRel. There are multiple records in OrderRel for each OrderHed. I'm trying to pull out the first record from OrderRel for each OrderHed. I have the following query, but it gives me a "Function sequence error" SELECT OrderHed.OrderNum, OrderRel.Plant FROM OrderHed INNER JOIN (SELECT Plant FROM OrderRel WHERE OrderRel.OrderNum = OrderHed.OrderNum LIMIT 1) OrdRel WHERE ((OrderHed.OpenOrder <> 0) AND (OrderHed.VoidOrder = 0)) ORDER BY OrderHed.OrderNum DESC Can anyone help me, please? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now